Skip to content

Commit f45042c

Browse files
committed
[types] improve types
1 parent 3b5deb1 commit f45042c

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

index.d.ts

+6-13
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
1-
type TypedArray =
2-
| Int8Array
3-
| Uint8Array
4-
| Uint8ClampedArray
5-
| Int16Array
6-
| Uint16Array
7-
| Int32Array
8-
| Uint32Array
9-
| Float32Array
10-
| Float64Array
11-
| BigInt64Array
12-
| BigUint64Array;
1+
import type { TypedArray } from 'is-typed-array';
132

14-
declare function typedArrayBuffer(x: TypedArray): ArrayBuffer;
3+
declare namespace typedArrayBuffer{
4+
export type { TypedArray };
5+
}
6+
7+
declare function typedArrayBuffer(x: typedArrayBuffer.TypedArray): ArrayBuffer;
158

169
export = typedArrayBuffer;

index.js

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ var $TypeError = require('es-errors/type');
44

55
var callBound = require('call-bound');
66

7+
/** @type {undefined | ((thisArg: import('.').TypedArray) => Buffer<ArrayBufferLike>)} */
78
var $typedArrayBuffer = callBound('TypedArray.prototype.buffer', true);
89

910
var isTypedArray = require('is-typed-array');

0 commit comments

Comments
 (0)