Why does aws-sdk redefine Blob and ReadableStream types? #5117
Unanswered
dogukanakkaya
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In
packages/types/src/serde.ts
definesBlob
andReadableStream
types with empty interfaces.Which causes return types from other modules to infer this, for example Supabase Storage:
So when I try to call functions on Blob like
.text()
,.arrayBuffer
or properties like.type
it shows a type error:Property 'text' does not exist on type 'Blob'.
This does not happen in Node, types are exported from
@types/node
.But in Deno
Blob
type is defined inlib.deno.web.d.ts
file.I am not sure what exactly the difference is between having that file in Deno as built-in to it or having it installed as a node package maybe the order of Typescript interprets it but not sure. Anyways I wonder why does aws-sdk defines those as empty interfaces in the first place?
Beta Was this translation helpful? Give feedback.
All reactions