-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(dts): add separate file to add missing arrayBuffer and sharedArra…
…yBuffer types
- Loading branch information
1 parent
541081d
commit 5925906
Showing
5 changed files
with
63 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
interface ArrayBuffer { | ||
/** | ||
* Read-only. The maximum length that this ArrayBuffer can be resized to (in bytes). | ||
*/ | ||
readonly maxByteLength: number; | ||
|
||
/** | ||
* Read-only. Whether this ArrayBuffer can be resized or not. | ||
*/ | ||
readonly resizable: boolean; | ||
|
||
/** | ||
* Resizes the ArrayBuffer to the specified size (in bytes). | ||
* @param newLength The new length, in bytes, to resize the ArrayBuffer to. | ||
*/ | ||
resize(newLength: number): undefined; | ||
} | ||
|
||
/** | ||
* ArrayBuffer constructor options | ||
*/ | ||
interface ArrayBufferOptions { | ||
maxByteLength?: number; | ||
} | ||
|
||
interface ArrayBufferConstructor { | ||
new(byteLength: number, options?: ArrayBufferOptions): ArrayBuffer; | ||
} | ||
|
||
interface SharedArrayBuffer { | ||
/** | ||
* Read-only. Whether this SharedArrayBuffer can be grow or not. | ||
*/ | ||
readonly growable: number; | ||
|
||
/** | ||
* Read-only. The maximum length that this SharedArrayBuffer can be grown to (in bytes). | ||
*/ | ||
readonly maxByteLength: number; | ||
|
||
/** | ||
* Grows the SharedArrayBuffer to the specified size (in bytes). | ||
* @param newLength The new length, in bytes, to resize the SharedArrayBuffer to. | ||
*/ | ||
grow(newLength: number): undefined; | ||
} | ||
|
||
/** | ||
* ArrayBuffer constructor options | ||
*/ | ||
interface SharedArrayBufferOptions { | ||
maxByteLength?: number; | ||
} | ||
|
||
interface SharedArrayBufferConstructor { | ||
new(); | ||
new(byteLength: number, options?: SharedArrayBufferOptions): SharedArrayBuffer; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/// <reference lib="es2023" /> | ||
/// <reference lib="esnext.intl" /> | ||
/// <reference lib="esnext.arraybuffer" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters