@badrap/valita
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -101,15 +101,15 @@ declare type PrettyIntersection<V> = Extract<{ | ||
} | ||
declare class StringType extends Type<number> { | ||
declare class StringType extends Type<string> { | ||
readonly name = "string"; | ||
genFunc(): Func<number>; | ||
genFunc(): Func<string>; | ||
toTerminals(into: TerminalType[]): void; | ||
} | ||
declare class BigIntType extends Type<number> { | ||
declare class BigIntType extends Type<bigint> { | ||
readonly name = "bigint"; | ||
genFunc(): Func<number>; | ||
genFunc(): Func<bigint>; | ||
toTerminals(into: TerminalType[]): void; | ||
} | ||
declare class BooleanType extends Type<number> { | ||
declare class BooleanType extends Type<boolean> { | ||
readonly name = "boolean"; | ||
genFunc(): Func<number>; | ||
genFunc(): Func<boolean>; | ||
toTerminals(into: TerminalType[]): void; | ||
@@ -116,0 +116,0 @@ } |
{ | ||
"name": "@badrap/valita", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "A validation & parsing library for TypeScript", | ||
@@ -5,0 +5,0 @@ "main": "./dist/main/index.js", |
@@ -599,5 +599,5 @@ // This is magic that turns object intersections to nicer-looking types. | ||
} | ||
class StringType extends Type<number> { | ||
class StringType extends Type<string> { | ||
readonly name = "string"; | ||
genFunc(): Func<number> { | ||
genFunc(): Func<string> { | ||
const issue: Issue = { code: "invalid_type", expected: ["string"] }; | ||
@@ -610,5 +610,5 @@ return (v, _mode) => (typeof v === "string" ? true : issue); | ||
} | ||
class BigIntType extends Type<number> { | ||
class BigIntType extends Type<bigint> { | ||
readonly name = "bigint"; | ||
genFunc(): Func<number> { | ||
genFunc(): Func<bigint> { | ||
const issue: Issue = { code: "invalid_type", expected: ["bigint"] }; | ||
@@ -621,5 +621,5 @@ return (v, _mode) => (typeof v === "bigint" ? true : issue); | ||
} | ||
class BooleanType extends Type<number> { | ||
class BooleanType extends Type<boolean> { | ||
readonly name = "boolean"; | ||
genFunc(): Func<number> { | ||
genFunc(): Func<boolean> { | ||
const issue: Issue = { code: "invalid_type", expected: ["boolean"] }; | ||
@@ -626,0 +626,0 @@ return (v, _mode) => (typeof v === "boolean" ? true : issue); |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
74692
0