Skip to content

Conversation

@jakebailey
Copy link
Member

Fixes #62210

I updated all tests to with, then introduced two tests just for assert, deprecated and not.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request deprecates the use of assert keyword in favor of with for import attributes, aligning TypeScript with the updated JavaScript standard. The PR updates all existing tests to use with and adds two new test files to verify the deprecation behavior.

Changes:

  • Source code change adds deprecation warning for assert keyword
  • Conversion of 30+ test files from assert to with syntax
  • Two new test files: one for deprecation errors, one for ignored deprecation

Reviewed changes

Copilot reviewed 139 out of 139 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/compiler/checker.ts Adds deprecation logic for assert keyword
tests/cases/compiler/importAssertionsDeprecated.ts New test for deprecation error
tests/cases/compiler/importAssertionsDeprecatedIgnored.ts New test with ignoreDeprecations flag
tests/cases/fourslash/*.ts Convert fourslash tests from assert to with
tests/cases/conformance/**/*.ts Convert conformance tests from assert to with
tests/baselines/reference/**/. Updated baselines reflecting error message changes

@jakebailey jakebailey added the Breaking Change Would introduce errors in existing code label Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team Breaking Change Would introduce errors in existing code For Milestone Bug PRs that fix a bug with a specific milestone

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

Deprecate, remove support for import assertions

3 participants