Skip to content

Exported contants under namespace not reassignable #575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MaxGraey opened this issue Apr 16, 2019 · 0 comments · Fixed by #920
Closed

Exported contants under namespace not reassignable #575

MaxGraey opened this issue Apr 16, 2019 · 0 comments · Fixed by #920
Labels

Comments

@MaxGraey
Copy link
Member

export namespace ns {
  export const a: i32 = 1;
  export const b: i32 = a;
}

Output:

ERROR TS2304: Cannot find name 'a'.

   export const b: i32 = a;
                         ~

But this works:

export namespace ns {
  export const a: i32 = 1;
  export const b: i32 = ns.a;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants