Skip to content

Releases: gcanti/io-ts

2.2.22

Choose a tag to compare

@gcanti gcanti released this 10 Dec 11:53
  • Bug Fix
    • Test for readonly type when optimizing tagged unions, #719

2.2.20

Choose a tag to compare

@gcanti gcanti released this 03 Dec 03:36
  • 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

Choose a tag to compare

@gcanti gcanti released this 06 Oct 12:23

2.2.18

Choose a tag to compare

@gcanti gcanti released this 29 Aug 14:28
9e8ef0e

2.2.17

Choose a tag to compare

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

2.2.16

Choose a tag to compare

@gcanti gcanti released this 08 Mar 13:42

Experimental modules require fp-ts@^2.5.0.

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

2.2.15

Choose a tag to compare

@gcanti gcanti released this 22 Feb 15:44
  • 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

Choose a tag to compare

@gcanti gcanti released this 03 Feb 08:55

2.2.13

Choose a tag to compare

@gcanti gcanti released this 20 Nov 15:25
  • Bug Fix
    • improve internal mergeAll function, closes #532 (@gcanti)

2.2.12

Choose a tag to compare

@gcanti gcanti released this 28 Oct 15:29
  • 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 })
})