v0.4.0
Pre-release-
Forbid main codecs resolving to void type
The following BARE schema is no longer valid when 'Message' is
a main codec (using --main CLI option):type Message void ^ error is now reported here -
Forbid flat unions which cannot be automatically flatten
bare-ts is able to automatically compute the tag of simple flat unions
without any help. A simple union is either:- a union of base or void types that can be discriminated by their
typeof value, or - a union of classes (requires the option
--use-class).
Previously, bare-ts asked to the user to provide a tagging function for
other cases (complex flat unions).
Now, bare-ts throws an error when it encounters a complex flat union.
Complex flat unions are no longer supported. - a union of base or void types that can be discriminated by their
-
Add pedantic mode (option --pedantic)
-
Better code generation
bare-ts has a normalization step where it alias some types,
including anonymous structs, data arrays, and typed arrays.bare-ts is now able to generate reader and writer without
aliasing these types.