@trayio/commons
Advanced tools
Comparing version 2.4.0 to 2.5.0
@@ -10,2 +10,3 @@ import * as E from 'fp-ts/lib/Either'; | ||
static stringRecord: Codec<Record<string, string>>; | ||
static partialRecord: <K extends Record<string, unknown>, G extends t.Any>(k: t.KeyofType<K>, type: G) => t.PartialC<Record<string, G>>; | ||
private descriptor; | ||
@@ -12,0 +13,0 @@ private constructor(); |
@@ -29,2 +29,3 @@ "use strict"; | ||
const t = __importStar(require("io-ts")); | ||
const Record_1 = require("fp-ts/Record"); | ||
const PathReporter_1 = require("io-ts/PathReporter"); | ||
@@ -53,1 +54,4 @@ const function_1 = require("fp-ts/function"); | ||
TypeCodec.stringRecord = TypeCodec.fromDescriptor(t.record(t.string, t.string)); | ||
// Added support for partial records as IO-TS does not support them | ||
// https://github.com/gcanti/io-ts/issues/429#issuecomment-862472408 | ||
TypeCodec.partialRecord = (k, type) => t.partial((0, Record_1.map)(() => type)(k.keys)); |
{ | ||
"name": "@trayio/commons", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"description": "Extensions to the standard/core libraries and basic features", | ||
@@ -5,0 +5,0 @@ "exports": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
105427
1905