Skip to content

Commit dc5836d

Browse files
committed
Update types after update
The previous types were just wrong. The api always only accepted a Uint8Array. ArrayBuffer or any other ArrayBufferView would have thrown a TypeError.
1 parent d804efc commit dc5836d

File tree

4 files changed

+4
-16
lines changed

4 files changed

+4
-16
lines changed

types/generated-snapshot/experimental/index.d.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,10 +1587,7 @@ declare class TextEncoder {
15871587
*
15881588
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto)
15891589
*/
1590-
encodeInto(
1591-
input: string,
1592-
buffer: ArrayBuffer | ArrayBufferView,
1593-
): TextEncoderEncodeIntoResult;
1590+
encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
15941591
get encoding(): string;
15951592
}
15961593
interface TextDecoderConstructorOptions {

types/generated-snapshot/experimental/index.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,10 +1592,7 @@ export declare class TextEncoder {
15921592
*
15931593
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto)
15941594
*/
1595-
encodeInto(
1596-
input: string,
1597-
buffer: ArrayBuffer | ArrayBufferView,
1598-
): TextEncoderEncodeIntoResult;
1595+
encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
15991596
get encoding(): string;
16001597
}
16011598
export interface TextDecoderConstructorOptions {

types/generated-snapshot/latest/index.d.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,10 +1542,7 @@ declare class TextEncoder {
15421542
*
15431543
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto)
15441544
*/
1545-
encodeInto(
1546-
input: string,
1547-
buffer: ArrayBuffer | ArrayBufferView,
1548-
): TextEncoderEncodeIntoResult;
1545+
encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
15491546
get encoding(): string;
15501547
}
15511548
interface TextDecoderConstructorOptions {

types/generated-snapshot/latest/index.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,10 +1547,7 @@ export declare class TextEncoder {
15471547
*
15481548
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto)
15491549
*/
1550-
encodeInto(
1551-
input: string,
1552-
buffer: ArrayBuffer | ArrayBufferView,
1553-
): TextEncoderEncodeIntoResult;
1550+
encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
15541551
get encoding(): string;
15551552
}
15561553
export interface TextDecoderConstructorOptions {

0 commit comments

Comments
 (0)