Skip to content

Commit cd94af2

Browse files
committed
fix(validator): BigInt constructor lost Boxed Type (microsoft/TypeScript#57283)
1 parent fb9521c commit cd94af2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/validator/src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ setResolverByShape(Number, {
347347
})
348348
setResolverByShape(BigInt, {
349349
preprocess: input => input instanceof BigInt
350-
? BigInt(input)
350+
// FIXME microsoft/TypeScript#57283
351+
? BigInt(input as bigint)
351352
: input,
352353
validate: input => typeof input === 'bigint',
353354
transform: input => {

0 commit comments

Comments
 (0)