Skip to content

Commit

Permalink
fix(validator): BigInt constructor lost Boxed Type (microsoft/TypeS…
Browse files Browse the repository at this point in the history
  • Loading branch information
NWYLZW committed Feb 4, 2024
1 parent fb9521c commit cd94af2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/validator/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,8 @@ setResolverByShape(Number, {
})
setResolverByShape(BigInt, {
preprocess: input => input instanceof BigInt
? BigInt(input)
// FIXME microsoft/TypeScript#57283
? BigInt(input as bigint)
: input,
validate: input => typeof input === 'bigint',
transform: input => {
Expand Down

0 comments on commit cd94af2

Please sign in to comment.