Skip to content

Releases: woutervh-/typescript-is

v0.19.0

01 Nov 10:23
Compare
Choose a tag to compare

New Features

  • Add transformNonNullExpressions which allows you to generate non-null assertions with the non-null assertion operator ! (#100)
  • Async methods will now return rejected promises when using ValidateClass and AssertType (#105)
  • Add option to generate code without error messages, resulting in smaller generated code size (#108)
  • Make generated function names deterministic, reducing the number of files changes in watch mode (#114)

Breaking Changes

None.

Bug fixes

  • Fix intersection types in combination with disallowSuperfluousProperties (#112)

v0.18.3

29 Jun 15:02
Compare
Choose a tag to compare

New Features

  • Add a more helpful error message when using type unions with null as one of the alternatives (#56 thanks to @dko-slapdash).

Breaking Changes

None.

Bug fixes

None.

v0.18.2

20 Mar 10:35
Compare
Choose a tag to compare

New Features

None.

Breaking Changes

None.

Bug fixes

  • Fixes bug in index.d.ts type declaration, where the types were being imported from the wrong location. (#93)

v0.18.1

07 Mar 18:24
Compare
Choose a tag to compare

New Features

None.

Breaking Changes

None.

Bug fixes

  • Fixes bug when a type alias of a type alias with type parameters is being used (#88). Thanks to @davidfurey (#89).

v0.18.0

07 Mar 18:20
Compare
Choose a tag to compare

New Features

  • Support for template literal types (#91) thanks to the amazing work of @DetachHead in #92.

Breaking Changes

None.

Bug fixes

None.

v0.17.1

10 Feb 20:01
Compare
Choose a tag to compare

New Features

None.

Breaking Changes

None.

Bug fixes

  • Fixed problems with interfaces that extend type aliases with type parameters. (fixes #86) Many thanks to @davidfurey

v0.17.0

25 Nov 18:06
Compare
Choose a tag to compare

New Features

  • Warning message in README about ts-loader with transpileOnly flag (#69 thanks to @b-zurg)
  • Replaced ignoreFunction flag with functionBehavior option. functionBehavior can be used to ignore functions, do a simple typeof check on functions, or throw compile-time errors.

Breaking Changes

None.

Bug fixes

  • Fixed bug with type aliases that have generics (#59)
  • Fixed bug where null would not be considered valid when used in combination with the strictNullChecks compiler option (#73)
  • Fixed wrong type definition of TypeGuardError (#74)
  • Fixed bug where parameters type checks would cause an error if they are preceded by parameters that don't have a type check (#75)

v0.16.3

18 Jun 09:16
Compare
Choose a tag to compare

New Features

None.

Breaking Changes

None.

Bug fixes

  • Fixed issue #67. Errors thrown by types that cannot be serialized by JSON.stringify are now caught, and the message without serialized input is returned as a fall back.

v0.16.2

31 May 14:32
Compare
Choose a tag to compare

New Features

None.

Breaking Changes

None.

Bug fixes

  • Fixed issue #65. Mapped types should work in TypeScript version 3.9 now.

v0.16.1

31 May 13:16
Compare
Choose a tag to compare

New Features

  • Merged PR #64 (@mitko-slapdash). Error messages will now contain the found data at the path. Example:
import { assertEquals } from 'typescript-is';

try {
  assertEquals<{ foo: number }>({});
} catch (error) {
  console.log(error.message); // validation failed at $: expected 'foo' in object, found: {}
}

Breaking Changes

None.

Bug fixes

None.