mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
27 lines
453 B
TypeScript
27 lines
453 B
TypeScript
//// [tests/cases/compiler/declarationEmitComputedPropertyNameSymbol2.ts] ////
|
|
|
|
//// [type.ts]
|
|
namespace Foo {
|
|
export const sym = Symbol();
|
|
}
|
|
export type Type = { x?: { [Foo.sym]: 0 } };
|
|
|
|
//// [index.ts]
|
|
import { type Type } from "./type";
|
|
|
|
export const foo = { ...({} as Type) };
|
|
|
|
|
|
|
|
|
|
//// [type.d.ts]
|
|
declare namespace Foo {
|
|
const sym: unique symbol;
|
|
}
|
|
export type Type = {
|
|
x?: {
|
|
[Foo.sym]: 0;
|
|
};
|
|
};
|
|
export {};
|