Closed
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: