It may still work, but we no longer test on TypeScript < 4
Drop support for node.js 10
It may still work, but we no longer test on node.js < 12
Add "exports" to package.json
This is very unlikely to break your code, but it could cause issues if you were relying on importing a custom path from within this package. This update does also mean that (in environments that support it) the ESModules version of this library will be used in place of the CommonJS version
New Features
Added 'funtypes/readonly' version of the package that flips the defaults
Usage:
import * as t from 'funtypes/readonly';
This replaces Object with ReadonlyObject, Array with ReadonlyArray etc.
Added MutableObject, MutableArray etc. to allow explicitly mutable versions to be used when using the new 'funtypes/readonly' export
Added Mutable utility to do the inverse of the Readonly utility
Added Sealed utility to trigger an error for unexpected additional properties on objects
Usage:
import * as t from 'funtypes';
const MySealedSchema = Sealed(MySchema);
const MyDeepSealedSchema = Sealed(MySchema, {deep: true})
Change Log for funtypes (4.2.0 → 5.0.0)
Breaking Changes
Drop support for TypeScript 3.x
It may still work, but we no longer test on TypeScript < 4
Drop support for node.js 10
It may still work, but we no longer test on node.js < 12
Add "exports" to package.json
This is very unlikely to break your code, but it could cause issues if you were relying on importing a custom path from within this package. This update does also mean that (in environments that support it) the ESModules version of this library will be used in place of the CommonJS version
New Features
Added
'funtypes/readonly'
version of the package that flips the defaultsUsage:
This replaces
Object
withReadonlyObject
,Array
withReadonlyArray
etc.Added
MutableObject
,MutableArray
etc. to allow explicitly mutable versions to be used when using the new'funtypes/readonly'
exportAdded
Mutable
utility to do the inverse of theReadonly
utilityAdded
Sealed
utility to trigger an error for unexpected additional properties on objectsUsage:
Edit changelog