mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
35 lines
516 B
TypeScript
35 lines
516 B
TypeScript
//// [tests/cases/compiler/declarationEmitComputedPropertyNameEnum1.ts] ////
|
|
|
|
//// [type.ts]
|
|
export enum Enum {
|
|
A = "a",
|
|
B = "b"
|
|
}
|
|
|
|
export type Type = { x?: { [Enum.A]: 0 } };
|
|
|
|
//// [index.ts]
|
|
import { type Type } from "./type";
|
|
|
|
export const foo = { ...({} as Type) };
|
|
|
|
|
|
|
|
|
|
//// [type.d.ts]
|
|
export declare enum Enum {
|
|
A = "a",
|
|
B = "b"
|
|
}
|
|
export type Type = {
|
|
x?: {
|
|
[Enum.A]: 0;
|
|
};
|
|
};
|
|
//// [index.d.ts]
|
|
export declare const foo: {
|
|
x?: {
|
|
a: 0;
|
|
};
|
|
};
|