We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TypeScript Version: 3.7.3
Search Terms: useDefineForClassFields
Code See this small repo Base Class
after clone the repo and npm i , run npm test then change "useDefineForClassFields": true in tsconfig.json and run npm test again
npm i
npm test
"useDefineForClassFields": true
Expected behavior: useDefineForClassFields = false
Y { xf: 'FALSE', xfr: 'FALSE', xa: 'TRUE', ef: 'ey', efr: 'ey' }
Actual behavior: useDefineForClassFields = true
Y { xf: undefined, xfr: undefined, xa: undefined, ef: 'ey', efr: 'ey' }
Playground Link:
Related Issues: #33509
The text was updated successfully, but these errors were encountered:
Please post a self-contained repro here; we cannot run commands off arbitrary repos to demonstrate these sorts of bugs.
Sorry, something went wrong.
I clone the repo from GitLab to GitHub Base Class
Here are the screen captures.
I find the solution, use declare keyword.
declare
abstract class X extends Base implements YI { declare xa: string; declare xf: string; declare xfr: string; protected ef: string = 'ex'; protected readonly efr: string = 'ex'; protected get ea() { return 'ex'; } static z() { return 'X'; } type() { return X; } }
No branches or pull requests
TypeScript Version: 3.7.3
Search Terms: useDefineForClassFields
Code
See this small repo
Base Class
after clone the repo and
npm i
, runnpm test
then change
"useDefineForClassFields": true
in tsconfig.json and runnpm test
againExpected behavior:
useDefineForClassFields = false
Actual behavior:
useDefineForClassFields = true
Playground Link:
Related Issues: #33509
The text was updated successfully, but these errors were encountered: