mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
33 lines
719 B
TypeScript
33 lines
719 B
TypeScript
//// [tests/cases/compiler/computedPropertyNameWithImportedKey.ts] ////
|
|
|
|
//// [a.ts]
|
|
export const a = Symbol();
|
|
|
|
//// [b.ts]
|
|
import { a } from "./a";
|
|
export function fn({ [a]: value }: any): string {
|
|
return value;
|
|
}
|
|
|
|
|
|
//// [a.js]
|
|
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.a = void 0;
|
|
exports.a = Symbol();
|
|
//// [b.js]
|
|
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.fn = fn;
|
|
const a_1 = require("./a");
|
|
function fn({ [a_1.a]: value }) {
|
|
return value;
|
|
}
|
|
|
|
|
|
//// [a.d.ts]
|
|
export declare const a: unique symbol;
|
|
//// [b.d.ts]
|
|
import { a } from "./a";
|
|
export declare function fn({ [a]: value }: any): string;
|