Skip to content

[Feature]: Typescript 5 support #4048

@slaweet

Description

@slaweet

🚀 Feature Proposal

It would be great if ts-jest to supports recently released Typescript 5.0

Currently it warns that it doesn't support even Typescript 4.0, so I'm not reporting this as a bug, but rather a feature request:

ts-jest[versions] (WARN) Version 5.0.2 of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0).

and than my tests fail with

● Test suite failed to run

    TypeError: ts.getMutableClone is not a function

      at visitor (node_modules/@vue/cli-plugin-unit-jest/node_modules/ts-jest/dist/transformers/hoist-jest.js:63:34)
      at Object.visitNode (node_modules/typescript/lib/typescript.js:85353:21)
      at transformSourceFileOrBundle (node_modules/typescript/lib/typescript.js:87236:51)
      at transformation (node_modules/typescript/lib/typescript.js:108858:16)
      at transformRoot (node_modules/typescript/lib/typescript.js:108881:73)
      at transformNodes (node_modules/typescript/lib/typescript.js:108866:72)
      at emitJsFileOrBundle (node_modules/typescript/lib/typescript.js:109453:[26](https://git.kryptops.io/telltale/frontend/runs/104026?check_suite_focus=true#step:6:27))
      at emitSourceFileOrBundle (node_modules/typescript/lib/typescript.js:109388:7)
      at forEachEmittedFile (node_modules/typescript/lib/typescript.js:109142:26)

Motivation

It would allow allow people to use latest typescript features with ts-jest.

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions