Skip to content

test: run TypeScript tests on typescript 5+7 with combinations of exactOptionalPropertyTypes, skipLibCheck, strict - #16510

Open
vkarpov15 wants to merge 2 commits into
masterfrom
vkarpov15/gh-16506
Open

vkarpov15 wants to merge 2 commits into
masterfrom
vkarpov15/gh-16506

Conversation

@vkarpov15

Copy link
Copy Markdown
Collaborator

Fix #16506

Summary

Run TypeScript tests on all permutations of TypeScript 5/7, exactOptionalPropertyTypes true/false, skipLibCheck true/false, strict true/false. In an abundance of caution to minimize risk of surprise errors under different configurations.

Examples

…ctOptionalPropertyTypes, skipLibCheck, strict

Fix #16506
@vkarpov15 vkarpov15 added this to the 9.11 milestone Sep 15, 2026
Copilot AI lite review requested due to automatic review settings September 15, 2026 15:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The workflow contains a blocking --tsconfig configuration error, and the strictness matrix does not test non-strict checking.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Expands TypeScript type-test CI across TypeScript 5.9/7.0 and compiler-option combinations.

Changes:

  • Adds matrix-specific TSTyche configuration and 16 CI combinations.
  • Updates type tests for compiler compatibility.
  • Removes a redundant exact-optional-property-types fixture.
  • Adds TypeScript 7 compilation coverage.
File summaries
File Summary
tstyche.matrix.json Adds recursive matrix test configuration.
test/types/tsconfig.json Removes a redundant compiler option.
test/types/schemaTypeOptions.test.ts Adjusts encryption type cases.
test/types/schema.test.ts Updates expected-error placement.
test/types/exactOptionalPropertyTypes/exactOptionalPropertyTypes.test.ts Removes the redundant dedicated fixture.
.github/workflows/types.yml Adds the TypeScript/compiler-option matrix. Critical (2 votes): --tsconfig receives inline JSON instead of a file path. Moderate (3 votes): strict: false rows retain strict sub-options and do not test non-strict checking.
Review details

Suppressed comments (1)

.github/workflows/types.yml:75

  • The same issue applies to the fallback tsc run: passing --strict false does not disable the four explicitly forced strict sub-options, so the strict=false jobs compile with the same effective strictness as the strict=true jobs. Without deriving these flags from the matrix, this half of the matrix also misses the advertised non-strict configuration.
          --strict ${{ matrix.strict }} --strictNullChecks true
          --noImplicitAny true --noImplicitThis true --strictFunctionTypes true
  • Files reviewed: 6/6 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/types.yml
run: >-
npm run test:types -- --config tstyche.matrix.json
--target ${{ matrix.typescript }} --tsconfig
'{"extends":"./test/types/tsconfig.json","compilerOptions":{"strict":${{ matrix.strict }},"strictNullChecks":true,"noImplicitAny":true,"noImplicitThis":true,"strictFunctionTypes":true,"skipLibCheck":${{ matrix.skip_lib_check }},"exactOptionalPropertyTypes":${{ matrix.exact_optional_property_types }}}}'

@hasezoey hasezoey left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, though that makes test jobs quite messy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run tests against TypeScript 7

3 participants