Ts Xor Versions Save

Compose object types containing mutually exclusive keys, using this generic Typescript utility type.

v1.3.0

8 months ago

Improvements

  • xor: support xoring more than two types (up to 200!)

Documentation

  • readme: restructure content layout; highlight patterns including new with fetcher; update section about XORing multiple types

Tests

  • add new tests covering XORing together 200 types
  • expand tests for multiple XORed types to test 4 types
    • using the new comma-separated expanded generic param capacity
    • using the legacy nested-XOR pattern

Full Changelog: https://github.com/maninak/ts-xor/compare/v1.2.0...v1.3.0

v1.2.0

8 months ago

Improvements

  • package: indicate to bundlers that all modules are side-effect-free

Tests

  • package: add metadata & esm/cjs compatibility check as a test step
  • leverage ts-expect-error for tests expected to fail compilation

Full Changelog: https://github.com/maninak/ts-xor/compare/v1.1.1...v1.2.0

v1.1.1

8 months ago

Fixes

  • package: add proper support for both cjs and esm

Documentation

  • readme: restructure content layout; polish some sections
  • readme: link to source for claim of ts not having xor operator
  • readme: use modern type imports in code examples

Full Changelog: https://github.com/maninak/ts-xor/compare/v1.1.0...v1.1.1

v1.1.0

1 year ago

Improvements

  • xor: when hovering on VS Code, the types shown will now be derived and easier to reason with, instead of just showing type names (see docs for more info)

Documentation

Tests

  • tests: improve coverage with additional test cases

Fixes

  • readme: multiple corrections and updates
  • package: now properly hints that the code is in ESM (EDIT: might have introduced a regression fixed with v1.1.1)

Refactors

  • tidying up of lib and test code

Full Changelog: https://github.com/maninak/ts-xor/compare/v1.0.3...v1.1.0