Skip to content

Experiment: Always report useDefineForClassFields-related errors even when disabled#59623

Closed
rbuckton wants to merge 1 commit into
mainfrom
useDefineForClassFields-investigation
Closed

Experiment: Always report useDefineForClassFields-related errors even when disabled#59623
rbuckton wants to merge 1 commit into
mainfrom
useDefineForClassFields-investigation

Conversation

@rbuckton

@rbuckton rbuckton commented Aug 13, 2024

Copy link
Copy Markdown
Contributor

This is an experiment to establish a rough estimate of how frequently projects in the wild depend on the initializer order for TypeScript "Parameter Property Initializers" feature when used in conjunction with useDefineForClassFields: false.

Note that this will only catch cases where projects have an ordering dependency that would be reported as a use-before-definition error by the compiler when useDefineForClassFields is enabled.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Aug 13, 2024
@rbuckton

Copy link
Copy Markdown
Contributor Author

@typescript-bot test top1000

@typescript-bot

typescript-bot commented Aug 13, 2024

Copy link
Copy Markdown
Contributor

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
test top1000 ✅ Started 👀 Results

@typescript-bot

Copy link
Copy Markdown
Contributor

@rbuckton Here are the results of running the top 400 repos with tsc comparing main and refs/pull/59623/merge:

Something interesting changed - please have a look.

Details

google/blockly

2 of 3 projects failed to build with the old tsc and were ignored

tsconfig.json

@trevorade

Copy link
Copy Markdown

FYI, this commit is most likely missing a change to make isBlockScopedNameDeclaredBeforeUse ignore emitStandardClassFields when called from checkPropertyNotUsedBeforeDeclaration. I needed to also update that code to make TS2729 universally be emitted.

@microsoft microsoft locked as resolved and limited conversation to collaborators Jun 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants