Releases: outfoxx/typescriptpoet
🔥 1.1.2 Release
1.1.2 is a hotfix release.
Resolved Issues
- Define tag convenience extension for
AnyTypeSpecBuiler
🔥 1.1.1 Release
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
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<>
andAnyTypeSpec
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 toParameterSpec
&PropertySpec
builders. - Allow specifying module kind (module or namespace) in
ModuleSpec
- Added missing
TypeName
constructor toInterfaceSpec
- Type
Breaking Changes
- All references to
JavaDoc
/javaDoc
have been renamedTSDoc/tsDoc
- Decorators are output in a simplified format.
Resolved Issues
%N
now resolves anyTypeSpec<>
.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
1.0.0 is here and provides new features, fixes and breaking changes.
New Features
*Spec
&*Spec.Builder
s can now be tagged with domain specific data via the newTaggable
&Taggable.Builder
base classes.
Breaking Changes
None
Resolved Issues
None
Formatting Fixes & Relative Type Names
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
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
Features
- Properties in anonymous types can now be optional (e.g.
{a: string, b?: number}
)
Small features & bug fixes
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
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.