mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-03-29 08:58:23 +08:00
[bytebuffer] Add missing 'readBytes' and 'writeBytes' functions (#23044)
This commit is contained in:
10
types/bytebuffer/index.d.ts
vendored
10
types/bytebuffer/index.d.ts
vendored
@@ -307,6 +307,11 @@ declare class ByteBuffer
|
||||
*/
|
||||
readByte( offset?: number ): number;
|
||||
|
||||
/**
|
||||
* Reads the specified number of bytes
|
||||
*/
|
||||
readBytes( length: number, offset?: number): ByteBuffer;
|
||||
|
||||
/**
|
||||
* Reads a NULL-terminated UTF8 encoded string. For this to work the string read must not contain any NULL characters itself.
|
||||
*/
|
||||
@@ -508,6 +513,11 @@ declare class ByteBuffer
|
||||
*/
|
||||
writeByte( value: number, offset?: number ): ByteBuffer;
|
||||
|
||||
/**
|
||||
* Writes an array of bytes. This is an alias for append
|
||||
*/
|
||||
writeBytes( source: ByteBuffer | ArrayBuffer | Uint8Array | string, encoding?: string | number, offset?: number ): ByteBuffer;
|
||||
|
||||
/**
|
||||
* Writes a NULL-terminated UTF8 encoded string. For this to work the specified string must not contain any NULL characters itself.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user