io-ts
Advanced tools
Comparing version 2.2.15 to 2.2.16
@@ -17,2 +17,12 @@ # Changelog | ||
# 2.2.16 | ||
Experimental modules require `fp-ts@^2.5.0`. | ||
- **Experimental** | ||
- `Codec` | ||
- add `readonly` combinator (@gcanti) | ||
- `Encoder` | ||
- add `readonly` combinator (@gcanti) | ||
# 2.2.15 | ||
@@ -19,0 +29,0 @@ |
@@ -260,2 +260,7 @@ /** | ||
* @category combinators | ||
* @since 2.2.16 | ||
*/ | ||
export declare const readonly: <I, O, A>(codec: Codec<I, O, A>) => Codec<I, O, Readonly<A>> | ||
/** | ||
* @category combinators | ||
* @since 2.2.8 | ||
@@ -262,0 +267,0 @@ */ |
@@ -239,2 +239,7 @@ /** | ||
* @category combinators | ||
* @since 2.2.16 | ||
*/ | ||
export var readonly = identity; | ||
/** | ||
* @category combinators | ||
* @since 2.2.8 | ||
@@ -241,0 +246,0 @@ */ |
@@ -107,2 +107,7 @@ /** | ||
/** | ||
* @category combinators | ||
* @since 2.2.16 | ||
*/ | ||
export declare const readonly: <O, A>(decoder: Encoder<O, A>) => Encoder<O, Readonly<A>> | ||
/** | ||
* @category Contravariant | ||
@@ -109,0 +114,0 @@ * @since 2.2.3 |
@@ -123,2 +123,7 @@ import { memoize, intersect_ } from './Schemable'; | ||
} | ||
/** | ||
* @category combinators | ||
* @since 2.2.16 | ||
*/ | ||
export var readonly = identity; | ||
// ------------------------------------------------------------------------------------- | ||
@@ -125,0 +130,0 @@ // non-pipeables |
@@ -260,2 +260,7 @@ /** | ||
* @category combinators | ||
* @since 2.2.16 | ||
*/ | ||
export declare const readonly: <I, O, A>(codec: Codec<I, O, A>) => Codec<I, O, Readonly<A>> | ||
/** | ||
* @category combinators | ||
* @since 2.2.8 | ||
@@ -262,0 +267,0 @@ */ |
@@ -22,3 +22,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Invariant = exports.URI = exports.imap = exports.compose = exports.lazy = exports.sum = exports.fromSum = exports.intersect = exports.tuple = exports.fromTuple = exports.record = exports.fromRecord = exports.array = exports.fromArray = exports.partial = exports.fromPartial = exports.type = exports.struct = exports.fromType = exports.fromStruct = exports.nullable = exports.refine = exports.mapLeftWithInput = exports.UnknownRecord = exports.UnknownArray = exports.boolean = exports.number = exports.string = exports.literal = exports.fromDecoder = exports.make = void 0; | ||
exports.Invariant = exports.URI = exports.imap = exports.compose = exports.readonly = exports.lazy = exports.sum = exports.fromSum = exports.intersect = exports.tuple = exports.fromTuple = exports.record = exports.fromRecord = exports.array = exports.fromArray = exports.partial = exports.fromPartial = exports.type = exports.struct = exports.fromType = exports.fromStruct = exports.nullable = exports.refine = exports.mapLeftWithInput = exports.UnknownRecord = exports.UnknownArray = exports.boolean = exports.number = exports.string = exports.literal = exports.fromDecoder = exports.make = void 0; | ||
/** | ||
@@ -282,2 +282,7 @@ * **This module is experimental** | ||
* @category combinators | ||
* @since 2.2.16 | ||
*/ | ||
exports.readonly = function_1.identity; | ||
/** | ||
* @category combinators | ||
* @since 2.2.8 | ||
@@ -284,0 +289,0 @@ */ |
@@ -107,2 +107,7 @@ /** | ||
/** | ||
* @category combinators | ||
* @since 2.2.16 | ||
*/ | ||
export declare const readonly: <O, A>(decoder: Encoder<O, A>) => Encoder<O, Readonly<A>> | ||
/** | ||
* @category Contravariant | ||
@@ -109,0 +114,0 @@ * @since 2.2.3 |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Category = exports.Contravariant = exports.URI = exports.id = exports.compose = exports.contramap = exports.lazy = exports.sum = exports.intersect = exports.tuple = exports.array = exports.record = exports.partial = exports.type = exports.struct = exports.nullable = void 0; | ||
exports.Category = exports.Contravariant = exports.URI = exports.id = exports.compose = exports.contramap = exports.readonly = exports.lazy = exports.sum = exports.intersect = exports.tuple = exports.array = exports.record = exports.partial = exports.type = exports.struct = exports.nullable = void 0; | ||
var Schemable_1 = require("./Schemable"); | ||
@@ -135,2 +135,7 @@ var function_1 = require("fp-ts/lib/function"); | ||
exports.lazy = lazy; | ||
/** | ||
* @category combinators | ||
* @since 2.2.16 | ||
*/ | ||
exports.readonly = function_1.identity; | ||
// ------------------------------------------------------------------------------------- | ||
@@ -137,0 +142,0 @@ // non-pipeables |
{ | ||
"name": "io-ts", | ||
"version": "2.2.15", | ||
"version": "2.2.16", | ||
"description": "TypeScript runtime type system for IO decoding/encoding", | ||
@@ -21,3 +21,3 @@ "main": "lib/index.js", | ||
"peerDependencies": { | ||
"fp-ts": "^2.0.0" | ||
"fp-ts": "^2.5.0" | ||
}, | ||
@@ -24,0 +24,0 @@ "tags": [ |
457136
16381