Closed
Description
TypeScript Version: 2.3.1
Code
$ cat > foo.ts
export const FOO = 'FOO';
export class Bar { readonly type = FOO; }
$ tsc --declaration foo.ts
$ cat foo.d.ts
export declare const FOO = "FOO";
export declare class Bar {
readonly type: string;
}
EDIT: added readonly to clarify bug report
Expected behavior:
Bar.type is of type "FOO"
Actual behavior:
The type falls back to string