It'd be nice to have the following types from __domTypes exposed in the global scope:
HeadersInitRequestModeRequestInit(I'm sure there's more types, but these are the ones that I ran into that weren't exposed like they are in TypeScript.)
Makes sense, this will require changes to cli/js/lib.deno.shared_global.d.ts. A test case presenting those types are exposed is highly desired
I just found myself in the need of this as well.
At the moment, when somebody wants to make a client library - meaning for both deno and the browser - this person can't use one universally compatible type because deno uses __domTypes.RequestInit and TypeScript uses RequestInit.
If there is another simpler way of doing this, please let me know.
No, there isn't a simpler way. These just need to be exposed like some other ones already are.
I believe this can be closed! Looks like it was fixed in https://github.com/denoland/deno/pull/4687
Most helpful comment
I just found myself in the need of this as well.
At the moment, when somebody wants to make a client library - meaning for both deno and the browser - this person can't use one universally compatible type because deno uses
__domTypes.RequestInitand TypeScript usesRequestInit.If there is another simpler way of doing this, please let me know.