-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Declaration EmitThe issue relates to the emission of d.ts filesThe issue relates to the emission of d.ts files
Milestone
Description
TypeScript Version: 3.0.0-dev.20180602
Search Terms:
Cannot find namespace, declaration, TS2503
Code
yarn add typescript@next
yarn tsc -- src/foo.ts --declaration
const Foo = {
BANANA: 'banana' as 'banana',
}
export const Baa = {
[Foo.BANANA]: 1
};
Expected behavior:
No error.
Actual behavior:
src/foo.ts:6:4 - error TS2503: Cannot find namespace 'Foo'.
6 [Foo.BANANA]: 1
~~~
error Command failed with exit code 2.
Omitting the --declaration
option results in no error.
Ommiting the cast results in no error.
Playground Link:
Related Issues:
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Declaration EmitThe issue relates to the emission of d.ts filesThe issue relates to the emission of d.ts files