Skip to content

Releases: gcanti/io-ts

2.2.22

10 Dec 11:53
Compare
Choose a tag to compare
  • Bug Fix
    • Test for readonly type when optimizing tagged unions, #719

2.2.20

03 Dec 03:36
Compare
Choose a tag to compare
  • undeprecate FunctionType, FunctionC, Function
  • undeprecate NeverType, NeverC, never
  • undeprecate AnyType, AnyC, any
  • undeprecate RefinementC, refinement, Integer
  • add refinement overload to allow custom branding, closes #373

2.2.19

06 Oct 12:23
Compare
Choose a tag to compare

2.2.18

29 Aug 14:28
9e8ef0e
Compare
Choose a tag to compare

2.2.17

28 Jul 12:54
Compare
Choose a tag to compare
  • Bug Fix
    • Don't throw a TypeError when trying to decode a sum value that contains a dangerous string, #650 (@thewilkybarkid)

2.2.16

08 Mar 13:42
Compare
Choose a tag to compare

Experimental modules require fp-ts@^2.5.0.

  • Experimental
    • Codec
      • add readonly combinator (@gcanti)
    • Encoder
      • add readonly combinator (@gcanti)

2.2.15

22 Feb 15:44
Compare
Choose a tag to compare
  • Experimental
    • Schemable
      • (*) add readonly combinator (@gcanti)
      • (*) add struct combinator (@gcanti)
    • deprecate type in favour of struct (@gcanti)
    • deprecate fromType in favour of fromStruct (@gcanti)

(*) breaking change

2.2.14

03 Feb 08:55
Compare
Choose a tag to compare

2.2.13

20 Nov 15:25
Compare
Choose a tag to compare
  • Bug Fix
    • improve internal mergeAll function, closes #532 (@gcanti)

2.2.12

28 Oct 15:29
Compare
Choose a tag to compare
  • Experimental

(*) breaking change

In case of non-string tag values, the respective key must be enclosed in brackets

export const MySum: D.Decoder<
  unknown,
  | {
      type: 1 // non-`string` tag value
      a: string
    }
  | {
      type: 2 // non-`string` tag value
      b: number
    }
> = D.sum('type')({
  [1]: D.type({ type: D.literal(1), a: D.string }),
  [2]: D.type({ type: D.literal(2), b: D.number })
})