-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Unable to extend Error when targeting es5 with TS 2.1 #12058
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
Comments
For reference, this affects all code that extends a function that is both callable constructable. For example, see #11919. Since |
I won't complain if it's intentional change (workaround-ed easily), but at least it should be documented (i.e. breaking change) or even better the TS compiler should give error on es5 target when 2.1 will be released. |
@asvetliakov I agree. I don't know what the intent exactly is. Either way subclassing builtins like |
It actually is an intentional change and documented here. I apologize about the inconvenience. |
Marking as a duplicate of #12123. |
TypeScript Version: 2.1.0-dev.20161104
Code
tsconfig.json
Expected behavior:
Actual behavior:
It works with TS 2.0.7
The text was updated successfully, but these errors were encountered: