We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ac2e8b commit cc89cf2Copy full SHA for cc89cf2
lib/internal/webstreams/encoding.js
@@ -20,6 +20,7 @@ const { customInspect } = require('internal/webstreams/util');
20
21
const {
22
codes: {
23
+ ERR_INVALID_ARG_TYPE,
24
ERR_INVALID_THIS,
25
},
26
} = require('internal/errors');
@@ -134,7 +135,7 @@ class TextDecoderStream {
134
135
this.#transform = new TransformStream({
136
transform: (chunk, controller) => {
137
if (chunk === undefined) {
- throw new ERR_INVALID_THIS('TextDecoderStream');
138
+ throw new ERR_INVALID_ARG_TYPE('chunk', 'string', chunk);
139
}
140
const value = this.#handle.decode(chunk, { stream: true });
141
if (value)
0 commit comments