This repository was archived by the owner on Aug 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 70
Support Typed Arrays #76
Copy link
Copy link
Open
Description
Error: Type 'Int8Array' is not specified in the provided files but is required for property: 'arr'. Please include it.
Would be awesome if intermock would support Typed Arrays and generate values within each range e.g.
Array<T>
ReadonlyArray<T>
Int8Array
Uint8Array
Uint8ClampedArray
Int16Array
Uint16Array
Int32Array
Uint32Array
Float32Array
Float64Array (represented as string for JSON compatibility)
BigInt64Array (represented as string for JSON compatibility)
BigUint64Array (represented as string for JSON compatibility)
e.g.
interface Data {
str: string
arr: Int8Array;
}
const arr = [...new Int8Array([127, 0, 0, 1])]Output
{
"Data": {
"str": "voluptatum minima voluptates",
"arr": [
127,
0,
0,
1,
]
}
}Ref: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/globals.d.ts#L94-L106
Metadata
Metadata
Assignees
Labels
No labels