Closed
Description
OS?
Mac OSX Sierra
Versions.
1.0.0-beta.17
Repro steps.
ng new --prefix=t check-enum
cd check-enum/
ng serve
then add to main.ts
(no matter, may be any *.ts)
declare namespace Sts {
export const enum A{
a, b, c
}
}
console.log(Sts.A.a, Sts.A.b);
The log given by the failure.
main.bundle.js:65131 Uncaught ReferenceError: Sts is not defined
Actual in main.bundle.js
console.log(Sts.A.a, Sts.A.b);
(see at Source panel of Chrome Developer Tools)
Expected in main.bundle.js
console.log(0 /* a */, 1 /* b */);
If I run tsc
from src
directory, this code will be in dist/out-tsc
, as expected. TypeScript is OK!
Mention any other details that might be useful.
I donn't know, where is a mistake, in angular-cli or its configuration or deps. Generated code is same, as without
const
keyword. This is very strange.