More test suite strictness fixups#63022
Merged
DanielRosenwasser merged 3 commits intomainfrom Jan 21, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses test suite compatibility with stricter TypeScript compiler settings, specifically targeting noImplicitThis and strictPropertyInitialization errors. The changes ensure that test cases can run under stricter mode defaults while still testing the intended behaviors.
Changes:
- Modified two fourslash tests to avoid
strictPropertyInitializationissues by changing class patterns to interfaces or constructors - Added
@strict: falseor@noImplicitThis: falsedirectives to 11 compiler test files that intentionally test non-strict behaviors - Added
@strictPropertyInitialization: falseto a test that needs uninitialized class properties
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| fixExactOptionalUnassignableProperties12.ts | Changed from class with instantiation to interface with declare to avoid property initialization requirements |
| fixExactOptionalUnassignableProperties11.ts | Changed property assignment from method to constructor to satisfy property initialization rules |
| parserModifierOnStatementInBlock1.ts | Added @strict: false to allow this in global scope |
| interfaceExtendsObjectIntersectionErrors.ts | Added @strictPropertyInitialization: false to allow uninitialized properties in test classes |
| noParameterReassignmentJSIIFE.ts | Added @noImplicitThis: false for test using this in function |
| lambdaPropSelf.ts | Added @strict: false for test using this in various contexts |
| declarationEmitPromise.ts | Added @noImplicitThis: false for test using this with apply |
| collisionThisExpressionAndVarInGlobal.ts | Added @strict: false for collision test with global this |
| collisionThisExpressionAndModuleInGlobal.ts | Added @strict: false for collision test with global this |
| collisionThisExpressionAndFunctionInGlobal.ts | Added @strict: false for collision test with global this |
| collisionThisExpressionAndEnumInGlobal.ts | Added @strict: false for collision test with global this |
| collisionThisExpressionAndClassInGlobal.ts | Added @strict: false for collision test with global this |
| collisionThisExpressionAndAmbientVarInGlobal.ts | Added @strict: false for collision test with global this |
| collisionThisExpressionAndAmbientClassInGlobal.ts | Added @strict: false for collision test with global this |
| collisionThisExpressionAndAliasInGlobal.ts | Added @strict: false for collision test with global this |
| blockScopedBindingCaptureThisInFunction.ts | Added @strict: false for test capturing this in function |
RyanCavanaugh
approved these changes
Jan 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a small set of fixes for what's mainly
noImplicitThisandstrictPropertyInitialization. I didn't change everything - I think we should actually just deal with most of thenoImplicitThiserrors.Part of #62333.