TypeScript/tests/cases/compiler/declarationEmitConstantNoWidening.ts
Wesley Wigham 62d8b85f1d
Allow literal initializers of readonly properties in declaration files (#26313)
* Allow literal initializers of readonly properties in declaration files

* Move some conditions a bit
2018-09-05 11:30:05 -07:00

5 lines
172 B
TypeScript

// @declaration: true
export const FOO = 'FOO';
export class Bar {
readonly type = FOO; // Should be widening literal "FOO" - so either `typeof "FOO"` or = "FOO"
}