TypeScript/tests/cases/compiler/declarationEmitComputedNameCausesImportToBePainted.ts
2018-08-17 16:30:01 -07:00

15 lines
332 B
TypeScript

// @declaration: true
// @lib: es6
// @filename: context.ts
export const Key = Symbol();
export interface Context {
[Key]: string;
}
// @filename: index.ts
import { Key, Context } from "./context";
export const context: Context = {
[Key]: 'bar',
}
export const withContext = ({ [Key]: value }: Context) => value;