@badrap/valita
Advanced tools
Comparing version
@@ -1234,3 +1234,3 @@ "use strict"; | ||
*/ | ||
const string = singleton("string", TAG_STRING, (v) => typeof v === "string" ? undefined : ISSUE_EXPECTED_STRING); | ||
const string = singleton("string", TAG_STRING, (v) => (typeof v === "string" ? undefined : ISSUE_EXPECTED_STRING)); | ||
exports.string = string; | ||
@@ -1240,3 +1240,3 @@ /** | ||
*/ | ||
const number = singleton("number", TAG_NUMBER, (v) => typeof v === "number" ? undefined : ISSUE_EXPECTED_NUMBER); | ||
const number = singleton("number", TAG_NUMBER, (v) => (typeof v === "number" ? undefined : ISSUE_EXPECTED_NUMBER)); | ||
exports.number = number; | ||
@@ -1246,3 +1246,3 @@ /** | ||
*/ | ||
const bigint = singleton("bigint", TAG_BIGINT, (v) => typeof v === "bigint" ? undefined : ISSUE_EXPECTED_BIGINT); | ||
const bigint = singleton("bigint", TAG_BIGINT, (v) => (typeof v === "bigint" ? undefined : ISSUE_EXPECTED_BIGINT)); | ||
exports.bigint = bigint; | ||
@@ -1252,3 +1252,3 @@ /** | ||
*/ | ||
const boolean = singleton("boolean", TAG_BOOLEAN, (v) => typeof v === "boolean" ? undefined : ISSUE_EXPECTED_BOOLEAN); | ||
const boolean = singleton("boolean", TAG_BOOLEAN, (v) => (typeof v === "boolean" ? undefined : ISSUE_EXPECTED_BOOLEAN)); | ||
exports.boolean = boolean; | ||
@@ -1263,3 +1263,3 @@ /** | ||
*/ | ||
const undefined_ = singleton("undefined", TAG_UNDEFINED, (v) => v === undefined ? undefined : ISSUE_EXPECTED_UNDEFINED); | ||
const undefined_ = singleton("undefined", TAG_UNDEFINED, (v) => (v === undefined ? undefined : ISSUE_EXPECTED_UNDEFINED)); | ||
exports.undefined = undefined_; | ||
@@ -1266,0 +1266,0 @@ class LiteralType extends Type { |
@@ -1227,3 +1227,3 @@ "use strict"; | ||
*/ | ||
const string = singleton("string", TAG_STRING, (v) => typeof v === "string" ? undefined : ISSUE_EXPECTED_STRING); | ||
const string = singleton("string", TAG_STRING, (v) => (typeof v === "string" ? undefined : ISSUE_EXPECTED_STRING)); | ||
exports.string = string; | ||
@@ -1233,3 +1233,3 @@ /** | ||
*/ | ||
const number = singleton("number", TAG_NUMBER, (v) => typeof v === "number" ? undefined : ISSUE_EXPECTED_NUMBER); | ||
const number = singleton("number", TAG_NUMBER, (v) => (typeof v === "number" ? undefined : ISSUE_EXPECTED_NUMBER)); | ||
exports.number = number; | ||
@@ -1239,3 +1239,3 @@ /** | ||
*/ | ||
const bigint = singleton("bigint", TAG_BIGINT, (v) => typeof v === "bigint" ? undefined : ISSUE_EXPECTED_BIGINT); | ||
const bigint = singleton("bigint", TAG_BIGINT, (v) => (typeof v === "bigint" ? undefined : ISSUE_EXPECTED_BIGINT)); | ||
exports.bigint = bigint; | ||
@@ -1245,3 +1245,3 @@ /** | ||
*/ | ||
const boolean = singleton("boolean", TAG_BOOLEAN, (v) => typeof v === "boolean" ? undefined : ISSUE_EXPECTED_BOOLEAN); | ||
const boolean = singleton("boolean", TAG_BOOLEAN, (v) => (typeof v === "boolean" ? undefined : ISSUE_EXPECTED_BOOLEAN)); | ||
exports.boolean = boolean; | ||
@@ -1256,3 +1256,3 @@ /** | ||
*/ | ||
const undefined_ = singleton("undefined", TAG_UNDEFINED, (v) => v === undefined ? undefined : ISSUE_EXPECTED_UNDEFINED); | ||
const undefined_ = singleton("undefined", TAG_UNDEFINED, (v) => (v === undefined ? undefined : ISSUE_EXPECTED_UNDEFINED)); | ||
exports.undefined = undefined_; | ||
@@ -1259,0 +1259,0 @@ class LiteralType extends Type { |
{ | ||
"name": "@badrap/valita", | ||
"version": "0.3.13", | ||
"version": "0.3.14", | ||
"description": "A validation & parsing library for TypeScript", | ||
@@ -5,0 +5,0 @@ "main": "./dist/cjs/index.js", |
@@ -1808,4 +1808,6 @@ /** | ||
*/ | ||
const string = singleton<string>("string", TAG_STRING, (v) => | ||
typeof v === "string" ? undefined : ISSUE_EXPECTED_STRING, | ||
const string: () => Type<string> = singleton<string>( | ||
"string", | ||
TAG_STRING, | ||
(v) => (typeof v === "string" ? undefined : ISSUE_EXPECTED_STRING), | ||
); | ||
@@ -1816,4 +1818,6 @@ | ||
*/ | ||
const number = singleton<number>("number", TAG_NUMBER, (v) => | ||
typeof v === "number" ? undefined : ISSUE_EXPECTED_NUMBER, | ||
const number: () => Type<number> = singleton<number>( | ||
"number", | ||
TAG_NUMBER, | ||
(v) => (typeof v === "number" ? undefined : ISSUE_EXPECTED_NUMBER), | ||
); | ||
@@ -1824,4 +1828,6 @@ | ||
*/ | ||
const bigint = singleton<bigint>("bigint", TAG_BIGINT, (v) => | ||
typeof v === "bigint" ? undefined : ISSUE_EXPECTED_BIGINT, | ||
const bigint: () => Type<bigint> = singleton<bigint>( | ||
"bigint", | ||
TAG_BIGINT, | ||
(v) => (typeof v === "bigint" ? undefined : ISSUE_EXPECTED_BIGINT), | ||
); | ||
@@ -1832,4 +1838,6 @@ | ||
*/ | ||
const boolean = singleton<boolean>("boolean", TAG_BOOLEAN, (v) => | ||
typeof v === "boolean" ? undefined : ISSUE_EXPECTED_BOOLEAN, | ||
const boolean: () => Type<boolean> = singleton<boolean>( | ||
"boolean", | ||
TAG_BOOLEAN, | ||
(v) => (typeof v === "boolean" ? undefined : ISSUE_EXPECTED_BOOLEAN), | ||
); | ||
@@ -1840,3 +1848,3 @@ | ||
*/ | ||
const null_ = singleton<null>("null", TAG_NULL, (v) => | ||
const null_: () => Type<null> = singleton<null>("null", TAG_NULL, (v) => | ||
v === null ? undefined : ISSUE_EXPECTED_NULL, | ||
@@ -1848,4 +1856,6 @@ ); | ||
*/ | ||
const undefined_ = singleton<undefined>("undefined", TAG_UNDEFINED, (v) => | ||
v === undefined ? undefined : ISSUE_EXPECTED_UNDEFINED, | ||
const undefined_: () => Type<undefined> = singleton<undefined>( | ||
"undefined", | ||
TAG_UNDEFINED, | ||
(v) => (v === undefined ? undefined : ISSUE_EXPECTED_UNDEFINED), | ||
); | ||
@@ -1852,0 +1862,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
489846
0.09%8203
0.12%