We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ac954a commit c576427Copy full SHA for c576427
src/index.ts
@@ -363,6 +363,31 @@ export interface NumberC extends NumberType {}
363
*/
364
export const number: NumberC = new NumberType()
365
366
+/**
367
+ * @since 2.0.7
368
+ */
369
+export class BigIntType extends Type<bigint> {
370
+ readonly _tag: 'BigIntType' = 'BigIntType'
371
+ constructor() {
372
+ super(
373
+ 'bigint',
374
+ (u): u is bigint => typeof u === 'bigint',
375
+ (u, c) => (this.is(u) ? success(u) : failure(u, c)),
376
+ identity
377
+ )
378
+ }
379
+}
380
+
381
382
383
384
+export interface BigIntC extends BigIntType {}
385
386
387
388
389
+export const bigint: BigIntC = new BigIntType()
390
391
/**
392
* @since 1.0.0
393
0 commit comments