NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #4944 most downloaded on npm
TypeScript runtime type system for IO decoding/encoding
Last release 2 years ago
no release in 18 months
Ships unpredictably
gaps range from 2 weeks to 1.4 years
Nearly every release is documented
notes for 58 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
121 releases · first in 2017
Test for readonly type when optimizing tagged unions, #719
Handle record keys outside domain, #705 (@tgfisher4)
record keys outside domain, #705 (@tgfisher4)undeprecate FunctionType, FunctionC, Function
One column per quarter.
FunctionType, FunctionC, FunctionNeverType, NeverC, neverAnyType, AnyC, anyRefinementC, refinement, Integerallow Error to be decoded with UnknownRecord, #664 (@mlegenhausen)
Error to be decoded with UnknownRecord, #664 (@mlegenhausen)fix typescript@4.8 errors, closes #656, closes #647 (@gcanti)
typescript@4.8 errors, closes #656, closes #647 (@gcanti)Don't throw a TypeError when trying to decode a sum value that contains a dangerous string, #650 (@thewilkybarkid)
Experimental modules require fp-ts@^2.5.0.
Experimental modules require fp-ts@^2.5.0.
Codec
readonly combinator (@gcanti)Encoder
readonly combinator (@gcanti)deprecate type in favour of struct (@gcanti)
Schemable
readonly combinator (@gcanti)struct combinator (@gcanti)type in favour of struct (@gcanti)fromType in favour of fromStruct (@gcanti)(*) breaking change
relax UnknownRecord check, closes #559 (@waynevanson)
Guard
UnknownRecord check, closes #559 (@waynevanson)improve internal mergeAll function, closes #532 (@gcanti)
mergeAll function, closes #532 (@gcanti)(\*) make sum safer, closes #523 (@gcanti)
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 })
})
make toForest stack-safe, #520 (@safareli)
Decoder
toForest stack-safe, #520 (@safareli)expose modules without lib/es6 prefix, #507 (@osdiab)
remove Object.freeze calls, closes #497 (@gcanti)
Object.freeze calls, closes #497 (@gcanti)DecodeError
Wrap member (@gcanti)Decoder
withMessage combinator (@gcanti)TaskDecoder
withMessage combinator (@gcanti)(\*) remove KleisliDecoder module (@gcanti)
KleisliDecoder module (@gcanti)KleisliTaskDecoder module (@gcanti)JsonCodec module (@gcanti)JsonEncoder module (@gcanti)Codec
Codec more general by adding a I type parameter (@gcanti)fromType function (@gcanti)fromPartial function (@gcanti)fromArray function (@gcanti)fromRecord function (@gcanti)fromTuple function (@gcanti)fromSum function (@gcanti)compose function (@gcanti)Decoder
Decoder more general by adding a I type parameter (@gcanti)fromRefinement function (@gcanti)fromGuard signature (@gcanti)fromType function (@gcanti)fromPartial function (@gcanti)fromArray function (@gcanti)fromRecord function (@gcanti)fromTuple function (@gcanti)fromSum function (@gcanti)compose function (@gcanti)id function (@gcanti)functorDecoder instance to Functor (@gcanti)altDecoder instance to Alt (@gcanti)schemableDecoder (@gcanti)Category instance (@gcanti)InputOf type (@gcanti)TaskDecoder
TaskDecoder more general by adding a I type parameter (@gcanti)fromRefinement function (@gcanti)fromDecoder signature (@gcanti)fromType function (@gcanti)fromPartial function (@gcanti)fromArray function (@gcanti)fromRecord function (@gcanti)fromTuple function (@gcanti)fromSum function (@gcanti)compose function (@gcanti)id function (@gcanti)functorTaskDecoder instance to Functor (@gcanti)altTaskDecoder instance to Alt (@gcanti)schemableTaskDecoder (@gcanti)Category instance (@gcanti)InputOf type (@gcanti)Guard
Guard more general by adding a I type parameter (@gcanti)schemableGuard (@gcanti)InputOf type (@gcanti)alt function (@gcanti)zero function (@gcanti)compose function (@gcanti)id function (@gcanti)Codec
invariantCodec to Invariant (@gcanti)Encoder
contravariantEncoder to Contravariant (@gcanti)categoryEncoder to Category (@gcanti)Eq
schemableEq (@gcanti)Kleisli
id (@gcanti)type to fromType (@gcanti)partial to fromPartial (@gcanti)array to fromArray (@gcanti)record to fromRecord (@gcanti)tuple to fromTuple (@gcanti)sum to fromSum (@gcanti)Schemable
Schemable2C, WithUnknownContainers2C, WithUnion2C, WithRefine2C (@gcanti)Type
schemableType (@gcanti)(*) breaking change
add DecodeError module (@gcanti)
DecodeError module (@gcanti)FreeSemigroup module (@gcanti)TaskDecoder module (@gcanti)Kleisli module (@gcanti)KleisliDecoder module (@gcanti)KleisliTaskDecoder module (@gcanti)NaN from number instances (@gcanti)Tree module (@gcanti)Json type immutable (@gcanti)Decoder
never (@gcanti)parse pipeable and change its parser argument (@gcanti)DecoderError (@gcanti)withExpected in favour of mapLeftWithInput (@gcanti)Guard
never (@gcanti)Schemable
literal signature (@gcanti)union signature (@gcanti)(*) breaking change
add support for non-string tag values to sum, closes #481 (@gcanti)
Decoder
string tag values to sum, closes #481 (@gcanti)intersection should accumulate all errors (@gcanti)fix type information lost from nested decoder types, #479 (@gcanti)
JsonEncoder
id signature (@gcanti)remove the dependency on the either instance as a mean of improving tree shaking (@gcanti)
either instance as a mean of improving tree shaking (@gcanti)use the built-in Readonly type in readonly combinator, closes #472 (@gcanti)
Readonly type in readonly combinator, closes #472 (@gcanti)Type experimental module, #464 (@gcanti)O type parameter to Encoder, #469 (@gcanti)O type parameter to Codec (@gcanti)JsonCodec experimental module (@gcanti)JsonEncoder experimental module (@gcanti)Schemable
Schemable interface to Schemable1 (@gcanti)WithUnion interface to WithUnion1 (@gcanti)Schemable interface (@gcanti)WithUnion interface (@gcanti)WithRefinement / WithRefinement1 interfaces (@gcanti)WithUnknownContainers / WithUnknownContainers1 interfaces (@gcanti)
UnknownArray and UnknownRecord to WithUnknownContainers (@gcanti)Schema
Schemable interface (@gcanti)interpreter function (@gcanti)typescript@3.9.3 (@gcanti)add DecodeError interface (@gcanti)
Eq module (@gcanti)Codec
TypeOf operator (@gcanti)Decoder
DecodeError interface (@gcanti)Encoder
TypeOf operator (@gcanti)Guard
TypeOf operator (@gcanti)collect all errors while decoding, closes #449 (@gcanti)
Decoder
add Codec, Decoder, Encoder, Guard, Schema, Schemable, Tree modules (@gcanti)
Codec, Decoder, Encoder, Guard, Schema, Schemable, Tree modules (@gcanti)remove useless hasOwnProperty calls, closes #423 (@gcanti)
hasOwnProperty calls, closes #423 (@gcanti)Nothing published for this version
fix record domain handling, closes #391 (@gcanti)
record domain handling, closes #391 (@gcanti)- New Feature - add bigint codec (@mixedCase)
bigint codec (@mixedCase)whitelist window in UnknownRecord, fix #413 (@gcanti)
window in UnknownRecord, fix #413 (@gcanti)partial shouldn't allow arrays, fix #407 (@gcanti)
partial shouldn't allow arrays, fix #407 (@gcanti)remove getters, fix #404 (@gcanti)
- Bug Fix - rewrite es6 imports (@gcanti)
- Bug Fix - fix #397 (@gcanti)
fix getTags algorithm for mutually recursive codecs, closes #354 (@gcanti)
getTags algorithm for mutually recursive codecs, closes #354 (@gcanti)move fp-ts to peerDependencies (@gcanti)
fp-ts@2.x (@gcanti)fp-ts to peerDependencies (@gcanti)remove unneeded internal code (@gcanti)
revert 1.10.0 compatibility, fix #344 (@gcanti)
1.10.0 compatibility, fix #344 (@gcanti)move fp-ts back to dependencies (@gcanti)
fp-ts back to dependencies (@gcanti)handle strict, exact and refinement codecs when optimizing tagged unions, fix #339 (@gcanti)
strict, exact and refinement codecs when optimizing tagged unions, fix #339 (@gcanti)make io-ts compatible with both fp-ts@1.x, fp-ts@2.x (@gcanti)
io-ts compatible with both fp-ts@1.x, fp-ts@2.x (@gcanti)deprecate taggedUnion in favour of union (@gcanti)
union is now able to detect and optimize tagged unions (@gcanti)taggedUnion in favour of union (@gcanti)output ES modules to better support tree-shaking, closes #326 (@gcanti)
output ES modules to better support tree-shaking, closes #326 (@gcanti)
change how types and output types are retrieved in IntersectionC and TupleC, fix #315 (@gcanti)
IntersectionC and TupleC, fix #315 (@gcanti)autobind decode method (@gcanti)
decode method (@gcanti)deprecate FunctionType (@gcanti)
stripInternal flag to tsconfig.json (@gcanti)NaN in PathReporter (@gcanti)NeverType (@gcanti)FunctionType (@gcanti)align the runtime behavior of Exact.is with the type system, fix #288 (@gcanti)
Exact.is with the type system, fix #288 (@gcanti)un-deprecate strict combinator, is now an alias of exact(type(...)) (@gcanti)
brand combinator (@gcanti, @lostintime)Int codec (@gcanti)exact strips additional properties while decoding / encoding (@gcanti)strict combinator, is now an alias of exact(type(...)) (@gcanti)refinement combinator in favour of brand (@gcanti)Integer codec in favour of Int (@gcanti)StrictType class (@gcanti)StrictC interface (@gcanti)intersection in order to support combinators that strip additional properties (@gcanti)message field in ValidationError (@gcanti)actual value to all context entries (@gcanti)exact now bails out when the value is not an UnknownRecord (@gcanti)tuple should not leak the implementation (never usage) (@gcanti)exact should not leak the implementation (never usage) (@gcanti)Number.isInteger in Integer implementation (@gcanti)exact codecs (@gcanti)Nothing published for this version
deprecate Dictionary in favour of UnknownRecord (@gcanti)
any (@gcanti)object (@gcanti)Dictionary in favour of UnknownRecord (@gcanti)Array in favour of UnknownArray (@gcanti)dictionary in favour of record (@gcanti)deprecate getValidationError (@gcanti)
ValidationErrormessage argument to failurePathReporter should account for the new fieldactual optional field to ContextEntry, closes #194 (@gcanti)getValidationError (@gcanti)getDefaultContext (@gcanti)getIndexRecord: getIndexRecord: handle conflicting tags in different positions, ref #263 (@gcanti)
getIndexRecord: getIndexRecord: handle conflicting tags in different positions, ref #263 (@gcanti)union optimization, needs more work to make it happen (@gcanti)prevent maximum call stack size exceeded when indexing recursive codecs, closes #259 (@gcanti)
make isIndexableCodec more strict (@gcanti)
isIndexableCodec more strict (@gcanti)taggedUnion should handle sub unions / tagged unions correctly, closes #257 (@gcanti)
taggedUnion should handle sub unions / tagged unions correctly, closes #257 (@gcanti)union with the same algorithm used in taggedUnion (@gcanti)Important. This version requires typescript@3.2.2+
Important. This version requires typescript@3.2.2+
typescript@3.2.2 (@gcanti)
TypeCPartialCRecordCUnionCReadonlyCStrictCTaggedUnionCdeprecate PropsOf type (@gcanti)
NullCUndefinedCVoidCAnyCUnknownCNeverCStringCNumberCBooleanCUnknownArrayCUnknownRecordCObjectCFunctionCRefinementCLiteralCKeyofCArrayCTypeCPartialCRecordCUnionCIntersectionCTupleCReadonlyCReadonlyArrayCStrictCTaggedUnionCExactCtypescript@3.0.1 feature) (@gcanti)union should handle zero types (@gcanti)intersection should handle zero / one types (@gcanti)clean (@gcanti)alias (@gcanti)PropsOf type (@gcanti)Exact type (@gcanti)deprecate Compact type (@gcanti)
Compact type (@gcanti)remove useless module augmentation of Array (@gcanti)
Array (@gcanti)ThrowReporter is now deprecated (@gcanti)
UnknownType, closes #238 (@gcanti)ThrowReporter is now deprecated (@gcanti)use Compact in intersection signatures as a workaround for #234 (@sledorze)
use Compact in intersection signatures as a workaround for #234 (@sledorze)
Type.prototype.pipe now allows more types as input, #231 #232 (@sledorze)
Type.prototype.pipe now allows more types as input, #231 #232 (@sledorze)Your coding agent can read these notes before it upgrades. Set up the MCP server →