Skip to content

useDefineForClassFields flag for different output #35563

Closed
@agrozyme

Description

@agrozyme

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    UnactionableThere isn't something we can do with this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions