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
Module with "Object" export has bad ES5 emit #17494
Labels
Projects
Milestone
Comments
DanielRosenwasser
added
Bug
A bug in TypeScript
Needs Proposal
This issue needs a plan that clarifies the finer details of how it could be implemented.
labels
Jul 28, 2017
As a temporary workaround, you can name your class |
This should be an error, similar to the error we issue if you declare your own |
DanielRosenwasser
removed
the
Needs Proposal
This issue needs a plan that clarifies the finer details of how it could be implemented.
label
Jul 28, 2017
PRs welcomed. |
Kingwl
added a commit
to Kingwl/TypeScript
that referenced
this issue
Oct 13, 2017
Kingwl
added a commit
to Kingwl/TypeScript
that referenced
this issue
Oct 13, 2017
Kingwl
added a commit
to Kingwl/TypeScript
that referenced
this issue
Oct 13, 2017
Kingwl
added a commit
to Kingwl/TypeScript
that referenced
this issue
Oct 14, 2017
Kingwl
added a commit
to Kingwl/TypeScript
that referenced
this issue
Oct 17, 2017
Kingwl
added a commit
to Kingwl/TypeScript
that referenced
this issue
May 24, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
TypeScript Version: 2.2 to current
Code
TS file:
export class Object {}
tsconfig.json:
{"compilerOptions": {"target": "es5"}}
Expected behavior:
The module should be able to initialize like it did in TypeScript 2.1.
Actual behavior:
Module fails to initialize;
TypeError: Object is undefined
.The emitted code is
Clearly
Object.defineProperty
is intended to reference the globalObject
, but it gets an uninitialized local variable instead.The text was updated successfully, but these errors were encountered: