src: Missed some code for BigInt/BigUint classes
This commit is contained in:
parent
9c332eb64a
commit
237dd87aeb
1 changed files with 6 additions and 3 deletions
|
|
@ -211,12 +211,13 @@ const primitiveTypeOfTypes = new Set([
|
||||||
'undefined',
|
'undefined',
|
||||||
'string',
|
'string',
|
||||||
'number',
|
'number',
|
||||||
|
'bigint',
|
||||||
'boolean',
|
'boolean',
|
||||||
'symbol'
|
'symbol'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// TODO: This should be able to be `not object` when the `not` operator is out
|
// TODO: This should be able to be `not object` when the `not` operator is out
|
||||||
export type Primitive = null | undefined | string | number | boolean | symbol;
|
export type Primitive = null | undefined | string | number | bigint | boolean | symbol;
|
||||||
|
|
||||||
is.primitive = (value: unknown): value is Primitive => is.null_(value) || primitiveTypeOfTypes.has(typeof value);
|
is.primitive = (value: unknown): value is Primitive => is.null_(value) || primitiveTypeOfTypes.has(typeof value);
|
||||||
|
|
||||||
|
|
@ -243,10 +244,12 @@ const typedArrayTypes = new Set([
|
||||||
TypeName.Int32Array,
|
TypeName.Int32Array,
|
||||||
TypeName.Uint32Array,
|
TypeName.Uint32Array,
|
||||||
TypeName.Float32Array,
|
TypeName.Float32Array,
|
||||||
TypeName.Float64Array
|
TypeName.Float64Array,
|
||||||
|
TypeName.BigInt64Array,
|
||||||
|
TypeName.BigUint64Array
|
||||||
]);
|
]);
|
||||||
|
|
||||||
export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
|
export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
|
||||||
|
|
||||||
is.typedArray = (value: unknown): value is TypedArray => {
|
is.typedArray = (value: unknown): value is TypedArray => {
|
||||||
const objectType = getObjectType(value);
|
const objectType = getObjectType(value);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue