Skip to content

v0.3.0

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 02 Mar 21:38
3d42173
  • Fix regression: Forbid bare schema in which a type is repeated in an union

    The following schema is now correctly reported as invalid:

    type X (u8 | u8)
    
  • Deduplicate readers and writers of complex non-aliased types

    @bare-ts/tools generates readers and writers for complex non-aliased types.
    These reader and writer are now de-duplicated.

  • Default to null instead of undefined for optional types

    The use of null seems more common than the use of undefined.

    The option --use-null is removed.
    A new option --use-undefined is added.

  • Make configurable the emitted type for void type

    BARE schema enable use of void types in unions. For example:

    type Union (u8 | void)
    

    Previously, @bare-ts/tools emitted the type undefined for void.
    Now it relies on options --use-undefined and --use-lax-optional to
    choose between null, undefined, and null | undefined.
    Note that these options also modify the emitted types for optionals.

  • Support for quoted properties

    The option --use-quoted-property enables to output
    quoted properties instead of unquoted properties.

    This can be useful when using a JS minifier that differently handles
    quoted and unquoted properties.