-
Notifications
You must be signed in to change notification settings - Fork 618
chore(types): update @types/node to 14 #4148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b6c50a0
to
f34942f
Compare
f34942f
to
fc8ec42
Compare
@@ -32,7 +32,7 @@ export const sdkStreamMixin = (stream: unknown): SdkStream<Readable> => { | |||
transformToString: async (encoding?: string) => { | |||
const buf = await transformToByteArray(); | |||
if (encoding === undefined || Buffer.isEncoding(encoding)) { | |||
return fromArrayBuffer(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding); | |||
return fromArrayBuffer(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding as BufferEncoding); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am telling Buffer.toString to not typecheck the encoding. This should not be applied upward to encoding?: string
because
- I don't think the enumeration is actually exhaustive, but regardless,
- it makes it very hard to make the browser version consistently typed with this one
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Issue
n/a
Description
A yarn issue is blocking my SSO PR, I think this may fix it.
The change should be valid considering we've dropped node 10 and 12 support.