Io Ts Versions Save

Runtime type system for IO decoding/encoding

2.2.20

1 year ago
  • 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

1 year ago
  • Bug Fix
    • allow Error to be decoded with UnknownRecord, #664 (@mlegenhausen)

2.2.18

1 year ago

2.2.17

1 year ago
  • Bug Fix
    • Don't throw a TypeError when trying to decode a sum value that contains a dangerous string, #650 (@thewilkybarkid)

2.2.16

3 years ago

Experimental modules require fp-ts@^2.5.0.

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

2.2.15

3 years ago
  • 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

3 years ago
  • Experimental
    • Guard
      • relax UnknownRecord check, closes #559 (@waynevanson)

2.2.13

3 years ago
  • Bug Fix
    • improve internal mergeAll function, closes #532 (@gcanti)

2.2.12

3 years ago
  • Experimental
    • (*) make sum safer, closes #523 (@gcanti)

(*) 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 })
})

2.2.11

3 years ago
  • Polish
    • Decoder
      • make toForest stack-safe, #520 (@safareli)