Skip to content

Releases: dsherret/ts-morph

28.0.0

12 Apr 18:02
c895bee

Choose a tag to compare

What's Changed

Note there are some breaking changes due to TypeScript 6.0. Read more here: https://devblogs.microsoft.com/typescript/announcing-typescript-6-0/

As part of this release, structures can now be printed to a string using the printStructure function.

import { printStructure, StructureKind } from "ts-morph";

const code = printStructure({
  kind: StructureKind.Class,
  name: "MyClass",
  isExported: true,
  properties: [{ name: "myProp", type: "string" }],
  methods: [{
    name: "myMethod",
    parameters: [{ name: "param", type: "number" }],
    returnType: "void",
  }],
});
console.log(code);

Outputs:

export class MyClass {
  myProp: string;

  myMethod(param: number): void {
  }
}

New Contributors

Full Changelog: 27.0.2...28.0.0

27.0.2

12 Oct 14:54
0dd1adc

Choose a tag to compare

What's Changed

  • Fixes the npm publish in order to get the fixes in from 27.0.1
    • fix: browser support no longer working since #1628 in 26.0.0 due to missing browser fields by @BossSloth in #1654

Full Changelog: 27.0.1...27.0.2

27.0.1

17 Sep 19:24
923182d

Choose a tag to compare

What's Changed

  • fix: browser support no longer working since #1628 in 26.0.0 due to missing browser fields by @BossSloth in #1654

New Contributors

Full Changelog: 27.0.0...27.0.1

27.0.0

07 Sep 20:47
2182f99

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 26.0.0...27.0.0

26.0.0

19 May 19:08
fa5d14d

Choose a tag to compare

What's Changed

  • feat: TypeScript 5.8 #1628
  • fix: Improve comma appending logic to handle nested template literals correctly by @kingston in #1630
  • fix(bootstrap): ignore dist-deno folder for npm publish #1610
  • feat: npm publish with provenance #1634

New Contributors

Full Changelog: 25.0.1...26.0.0

25.0.1

05 Feb 00:41
191c1f0

Choose a tag to compare

Bug Fixes

25.0.0

30 Dec 17:12
6c092c8

Choose a tag to compare

What's Changed

  • feat: TypeScript 5.7.2 #1594
  • fix: switch back to fast-glob for stability #1595
  • fix: properly insert async keyword in arrow function #1597
  • fix: throw descriptive error when inserting variable statement with no declarations #1598
  • fix: removing last named import/export should not remove or change declaration #1599

Full Changelog: 24.0.0...25.0.0

24.0.0

06 Oct 11:39
061a3fe

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 23.0.0...24.0.0

23.0.0

23 Jun 16:32
5e208c5

Choose a tag to compare

What's Changed

Now available on JSR for use in Deno: https://jsr.io/@ts-morph/ts-morph

Full Changelog: 22.0.0...23.0.0

22.0.0

10 Mar 17:25
886ad69

Choose a tag to compare

What's Changed

  • feat(BREAKING): upgrade to TypeScript 5.4 by @dsherret in #1516
  • fix(BREAKING): Node.prototype.forgetDescendants() no longer returns self by @dsherret in #1515
  • feat: Type.prototype.isAssignableTo by @dsherret in #1517
  • feat: TypeChecker.prototype.resolveName by @dsherret in #1518
  • fix: MethodDeclarationStructure should write an asterisk isGenerator = true by @ajvincent in #1502
  • docs: fix typo in adding-source-files.md by @ilirbeqirii in #1490
  • feat: ClassDeclarationStructure - support static blocks by @dsherret in #1520

CodeBlockWriter 13.0.1

People may have been working around these bugs in the past:

New Contributors

Full Changelog: 21.0.1...22.0.0