Skip to content

Commit c34f865

Browse files
committed
chore: fixed typings
1 parent 880e729 commit c34f865

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/canvas.d.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,9 @@ declare class CanvasView extends View {
331331
export function createImage(options: { width: number; height: number; scale?: number; config?: any }): ImageSource;
332332
export function releaseImage(image: ImageSource);
333333

334-
export function createArrayBuffer(length: number, useInts?): Float32Array | Int8Array | Float64Array;
335-
export function pointsFromBuffer(typedArray: Float32Array | Int8Array, useInts?): number[];
334+
335+
export type FloatArray = Float32Array | Float64Array | Uint8Array;
336+
export type TypedArray = FloatArray | Uint8Array;
337+
export function createArrayBuffer(length: number, useInts?): TypedArray;
338+
export function pointsFromBuffer(typedArray: TypedArray, useInts?): number[] | TypedArray;
336339
export function arrayToNativeArray(array, useInts?): number[];

0 commit comments

Comments
 (0)