Skip to content

Fix use-before-def with methods on esnext+useDefineForClassFields #38033

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

Merged

Conversation

sandersn
Copy link
Member

It was incorrectly flagging methods as used before their definition, but this is allowed under any emit.
The esnext+useDefineForClassFields-specific error should only apply to properties, but incorrectly applied to any declaration. This change makes it only apply to properties.

Fixes #37573

It was incorrectly flagging methods as used before their definition, but
this is allowed under any emit.
@sandersn sandersn merged commit 63ff657 into master Apr 21, 2020
@sandersn sandersn deleted the fix-use-before-def-methods-esnext-useDefineForClassFields branch April 21, 2020 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False positive for TS2729 (use before initialization) in 3.8.3, nightly
3 participants