unstale

npm / ts-morph

ts-morph

What changed in ts-morph 13 to 28, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

18 breaking1 deprecations27 new APIs and options1 performance3 behavior and defaults7 tooling25 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

ts-morph 283 changes

Breaking changes 1

  • ts-morph now uses TypeScript 6.0, which introduces breaking changes that may affect developers.

    28.0.0release notes

New APIs and options 1

  • A standalone function prints structures to a string.

    28.0.0release notes

Fixes and other changes 1

  • Fixes an InvalidOperationError in addTypeArgument.

    28.0.0release notes

ts-morph 277 changes

New APIs and options 4

Tooling 1

Fixes and other changes 2

  • Remove invalid sourceMappingURL from build output.

    27.0.0release notes

  • Re-export StandardizedFilePath from @ts-morph/common.

    27.0.0release notes

ts-morph 262 changes

Tooling 1

Fixes and other changes 1

  • Improves comma appending logic to handle nested template literals correctly.

    26.0.0release notes

ts-morph 253 changes

Breaking changes 1

  • Throws a descriptive error when inserting a variable statement with no declarations.

    25.0.0release notes

Fixes and other changes 2

  • Removing the last named import or export no longer removes or changes the declaration.

    25.0.0release notes

  • Properly inserts the async keyword when setting an arrow function as async.

    25.0.0release notes

ts-morph 243 changes

Tooling 1

Fixes and other changes 2

  • Fixed getBodyText() so it works as expected.

    24.0.0release notes

  • Corrected getDerivedClasses() results in some cases.

    24.0.0release notes

ts-morph 235 changes

New APIs and options 2

  • Adds Type.prototype.isBigInt for checking whether a type is bigint.

    23.0.0release notes

  • Adds isBigIntLiteral for checking whether a type is a bigint literal.

    23.0.0release notes

Tooling 1

Fixes and other changes 2

  • Fixes removeDefaultImport when used with a type-only import.

    23.0.0release notes

  • The package is available on JSR for use in Deno.

    23.0.0release notes

ts-morph 227 changes

Breaking changes 2

  • Node.prototype.forgetDescendants() no longer returns the node itself.

    22.0.0release notes

  • ts-morph upgrades to TypeScript 5.4, which may affect TypeScript compatibility in projects using ts-morph.

    22.0.0release notes

New APIs and options 3

Fixes and other changes 2

  • Corrects generated method declarations so isGenerator = true writes an asterisk.

    22.0.0release notes

  • Fixes quote() so it includes newlines on newline and consistently escapes characters.

    22.0.0release notes

ts-morph 217 changes

Breaking changes 2

  • Underlying @ts-morph/common file system methods return undefined instead of throwing when a path does not exist.

    21.0.0release notes

  • Private fields are actually private, and the default build requires private fields.

    21.0.0release notes

New APIs and options 3

  • Added a wrapped TypeChecker method and a convenience method on ShorthandPropertyAssignment for getting the value symbol.

    21.0.0release notes

  • Added getters and setters for interfaces and type literals.

    21.0.0release notes

  • Added defaultCompilerOptions to ProjectOptions.

    21.0.0release notes

Performance 1

  • Uses path.exists functions that do not throw internally when a path does not exist, improving performance.

    21.0.0release notes

Tooling 1

ts-morph 201 changes

Behavior and default changes 1

  • Supports dynamic type imports when finding referenced source files.

    20.0.0release notes

ts-morph 195 changes

New APIs and options 2

Behavior and default changes 1

  • Typing of Type was improved, which may affect how developers use its type information.

    19.0.0release notes

Tooling 1

Fixes and other changes 1

  • transform now works with Nodes from another parsed source file.

    19.0.0release notes

ts-morph 182 changes

Breaking changes 1

  • Upgraded to TypeScript 5.0.2, a breaking change that may affect developers using ts-morph.

    18.0.0release notes

Fixes and other changes 1

ts-morph 175 changes

Breaking changes 1

  • The project upgraded to TS 4.9, a breaking change for consumers relying on the previous TypeScript version.

    17.0.0release notes

New APIs and options 1

  • OrThrow methods now allow callers to provide custom error messages.

    17.0.0release notes

Fixes and other changes 3

  • getOverloads for a class method now takes into account whether the method is static.

    17.0.0release notes

  • ImportEqualsDeclaration can now be exported.

    17.0.0release notes

  • Named import and export specifier structures now include isTypeOnly.

    17.0.0release notes

ts-morph 166 changes

Breaking changes 2

  • Decorators are now modifiers due to TS 4.8.

    16.0.0release notes

  • Upgrades ts-morph to TypeScript 4.8, which may affect code relying on the previous TypeScript version.

    16.0.0release notes

Deprecations 1

  • The ts.createX functions are almost completely deprecated in TS 4.8; update code to use traversal.context.createX functions instead.

    16.0.0release notes

New APIs and options 2

  • Adds Type#isNever() for checking whether a type is never.

    16.0.0release notes

  • Adds Type#isReadonlyArray() for checking whether a type is a readonly array.

    16.0.0release notes

Fixes and other changes 1

  • Type#isArray() now returns true for readonly arrays.

    16.0.0release notes

ts-morph 1510 changes

Breaking changes 1

  • transform now returns a Node instead of this, because the returned node could be the replaced node.

    15.0.0release notes

New APIs and options 3

Tooling 1

  • Upgrades to TypeScript 4.7; review the changes to typescript.d.ts.

    15.0.0release notes

Fixes and other changes 5

  • Comment node type guards now handle undefined.

    15.0.0release notes

  • Deleting directories now works on Node.

    15.0.0release notes

  • Leading and trailing trivia for overloads now ends up in output.

    15.0.0release notes

  • Comments on nodes with only added synthetic leading comments now show up in transform output.

    15.0.0release notes

  • Transform now takes into account the node changing kinds.

    15.0.0release notes

ts-morph 142 changes

Breaking changes 2

  • Now returns an expression instead of a string literal.

    14.0.0release notes

  • Now represents an expression instead of a string literal.

    14.0.0release notes

ts-morph 1314 changes

Breaking changes 5

  • The target changed from ES2015 to ES2018.

    13.0.0release notes

  • Static type guard methods use Node.isX(node) instead of Node.isXNode(node), reducing verbosity.

    13.0.0release notes

  • Now returns directory entries instead of file paths.

    13.0.0release notes

  • The already deprecated TypeGuards export was removed; use Node instead.

    13.0.0release notes

  • The already deprecated WriterFunctions export was removed; use Writers instead.

    13.0.0release notes

New APIs and options 6

Behavior and default changes 1

  • The Structure.isX function was made more flexible.

    13.0.0release notes

Fixes and other changes 2

  • No longer throws an error when a decorator expression is wrapped in a parenthesized expression.

    13.0.0release notes

  • Added support for TypeScript 4.5.

    13.0.0release notes