Skip to content

Releases: outfoxx/typescriptpoet

🔥 1.1.2 Release

25 May 23:59
Compare
Choose a tag to compare

1.1.2 is a hotfix release.

Resolved Issues

  • Define tag convenience extension for AnyTypeSpecBuiler

🔥 1.1.1 Release

17 Mar 05:37
Compare
Choose a tag to compare

1.1.1 is a hotfix release.

Resolved Issues

  • Fixes an issue where imports from the same file were not correctly detected.

🎉 1.1.0 Release

13 Mar 00:14
Compare
Choose a tag to compare

1.1.0 is here and provides new features, fixes and breaking changes.

New Features

  • NameAllocator brought over to allocate names avoiding collisions.
  • Classes, interfaces, enums & aliases derive TypeSpec<> and AnyTypeSpec can be used to represent them.
  • %P is now supported to allow output template strings without escaping.
  • %Q is now supported to allow outputting a tracked symbol (as opposed to a type).
  • Imports are automatically renamed to avoid collisions.
  • All specs now implement toString for easier debugging
  • Added missing optional mutator to ParameterSpec & PropertySpec builders.
  • Allow specifying module kind (module or namespace) in ModuleSpec
  • Added missing TypeName constructor to InterfaceSpec
  • Type

Breaking Changes

  • All references to JavaDoc/javaDoc have been renamed TSDoc/tsDoc
  • Decorators are output in a simplified format.

Resolved Issues

  • %N now resolves any TypeSpec<>.
  • CodeWriter is now flushed after use.
  • Functions signatures use breaking spaces to allow line wrapping.
  • Static properties are no longer considered for shorthand properties.

🎉 1.0.0 Release

10 Feb 21:43
Compare
Choose a tag to compare

1.0.0 is here and provides new features, fixes and breaking changes.

New Features

  • *Spec & *Spec.Builders can now be tagged with domain specific data via the new Taggable & Taggable.Builder base classes.

Breaking Changes

None

Resolved Issues

None

Formatting Fixes & Relative Type Names

20 Nov 04:24
Compare
Choose a tag to compare

Fixed Formatting Issues

  • Decorated shorthand properties are correctly formatted
  • Decorated constructor parameters are correctly formatted
  • Strings use single quotes
  • Multi-line strings are formatted as joined single line strings

Relative Type Names

20 Nov 04:26
Compare
Choose a tag to compare

Relative type names

Type names are now shortened based on scope. Producing better looking code and reduces errors when creating nested or intermodule types.

Module -> Namespace

ModuleSpec now supports outputting namespace and module defintions.

Constructor Argument & Automatic Constructor Argument Properties

Previously ClassSpec always attempted to turn properties into constructor arguments. This can cause problems with optioal arguments. This is now selectable via flag on ClassSpec and is enabled by defualt to match previous behavior.

Optional anonymous properties

06 Sep 14:17
Compare
Choose a tag to compare

Features

  • Properties in anonymous types can now be optional (e.g. {a: string, b?: number})

Small features & bug fixes

05 Sep 12:22
Compare
Choose a tag to compare

Features

  • Allow importing symbols purely as a side-effect of whole file import
  • Allow adding code blocks to modules

Fixes

  • Fixes to symbol tracking when referencing types
  • Allow dots in all parts of an imported symbol name
  • Fix bug in DecoratorSpec.Builder.addParameter
  • Simplify gradle publishing scripts

Primary Release

14 Feb 20:33
Compare
Choose a tag to compare

The primary release has complete support for generating:

  • Module Declarations
  • Class Declarations
  • Interface Declarations
  • Enum Declarations
  • Type Alias Declarations
    • Including String & Numeric Literal Types
  • Declarator Declarations

It also supports generating type names referring to:

  • Simple Types
  • Array Types
  • Set Types
  • Map Types
  • Generic (e.g. Parameterized) Types
  • Tuple Types
  • Intersection & Union Types
  • Lambda Types

Finally, generating complex code blocks and function signatures is also easily done.