diff --git a/CHANGELOG.md b/CHANGELOG.md
index 74232e5d..7f9389b0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,16 @@
**Note**: Gaps between patch versions are faulty/broken releases.
**Note**: A feature tagged as Experimental is in a high state of flux, you're at risk of it changing without notice.
+# 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
- **Experimental**
diff --git a/docs/modules/Codec.ts.md b/docs/modules/Codec.ts.md
index de0027cc..0f5feca2 100644
--- a/docs/modules/Codec.ts.md
+++ b/docs/modules/Codec.ts.md
@@ -35,6 +35,7 @@ Added in v2.2.3
- [mapLeftWithInput](#mapleftwithinput)
- [nullable](#nullable)
- [partial](#partial)
+ - [readonly](#readonly)
- [record](#record)
- [refine](#refine)
- [struct](#struct)
@@ -237,6 +238,16 @@ export declare function partial
(codec: Codec) => Codec>
+```
+
+Added in v2.2.16
+
## record
**Signature**
diff --git a/docs/modules/Encoder.ts.md b/docs/modules/Encoder.ts.md
index 2d2cb614..153decb6 100644
--- a/docs/modules/Encoder.ts.md
+++ b/docs/modules/Encoder.ts.md
@@ -31,6 +31,7 @@ Added in v2.2.3
- [lazy](#lazy)
- [nullable](#nullable)
- [partial](#partial)
+ - [readonly](#readonly)
- [record](#record)
- [struct](#struct)
- [sum](#sum)
@@ -139,6 +140,16 @@ export declare function partial
>>(
Added in v2.2.3
+## readonly
+
+**Signature**
+
+```ts
+export declare const readonly: (decoder: Encoder) => Encoder>
+```
+
+Added in v2.2.16
+
## record
**Signature**
diff --git a/package.json b/package.json
index f904dc85..9c7cc243 100644
--- a/package.json
+++ b/package.json
@@ -1,13 +1,13 @@
{
"name": "io-ts",
- "version": "2.2.15",
+ "version": "2.2.16",
"description": "TypeScript runtime type system for IO decoding/encoding",
"main": "lib/index.js",
"module": "es6/index.js",
"typings": "lib/index.d.ts",
"sideEffects": false,
"scripts": {
- "lint": "tslint -p tsconfig.tslint.json src/**/*.ts test/**/*.ts",
+ "lint": "tslint -p .",
"eslint": "eslint \"src/**/*.ts\" \"test/**/*.ts\" \"scripts/**/*.ts\"",
"jest": "jest",
"prettier": "prettier --no-semi --single-quote --print-width 120 --parser typescript --list-different \"{src,test}/**/*.ts\"",
diff --git a/src/Codec.ts b/src/Codec.ts
index 035665ff..fe43c2aa 100644
--- a/src/Codec.ts
+++ b/src/Codec.ts
@@ -304,6 +304,12 @@ export function lazy(id: string, f: () => Codec): Codec(codec: Codec) => Codec> = identity
+
/**
* @category combinators
* @since 2.2.8
diff --git a/src/Encoder.ts b/src/Encoder.ts
index 5b7eac91..8cf7a085 100644
--- a/src/Encoder.ts
+++ b/src/Encoder.ts
@@ -162,6 +162,12 @@ export function lazy(f: () => Encoder): Encoder {
}
}
+/**
+ * @category combinators
+ * @since 2.2.16
+ */
+export const readonly: (decoder: Encoder) => Encoder> = identity
+
// -------------------------------------------------------------------------------------
// non-pipeables
// -------------------------------------------------------------------------------------