How to define and consume enums in typescript when using AMD?
The following tsc command doesn't create a usable foo.d.ts:
TSC -declaration -m amd foo.ts
foo.ts:
export enum foo {
bar
}
foo.d.ts:
export declare enum foo {
bar,
}
But
///<reference path="./foo.d.ts"/>
doesn't work until the "export" is removed fro foo.d.ts. Is there another
way of declaring a variable of type foo in a second file? Seems to me
referencing foo.ts should have worked (it didn't):
///<reference path="./foo.ts"/>
Am I missing a keyword?
No comments:
Post a Comment