[@types/node]: Missing fetch RequestInit types from globals #69408
Replies: 2 comments
-
Thanks for the discussion about "node", some useful links for everyone: Pinging the DT module owners: @microsoft, @jkomyno, @alvis, @r3nya, @btoueg, @smac89, @Touffy, @DeividasBakanas, @eyqs, @Hannes-Magnusson-CK, @hoo29, @kjin, @ajafff, @islishude, @mwiktorczyk, @mohsen1, @galkin, @parambirs, @eps1lon, @ThomasdenH, @WilcoBakker, @wwwy3y3, @samuela, @kuehlein, @bhongy, @chyzwar, @trivikr, @yoursunny, @qwelias, @ExE-Boss, @peterblazejewicz, @addaleax, @victorperin, @ZYSzys, @nodejs, @LinusU, @wafuwafu13, @mcollina, @Semigradsky. |
Beta Was this translation helpful? Give feedback.
-
Looks like this has not been solved yet, because there is no way to conditionally define a TypeScript Related discussion: #66824 (comment) What if there would be a separate |
Beta Was this translation helpful? Give feedback.
-
@types/node
is missing the followingfetch
related types from globals that are referenced inRequestInit
:HeadersInit
BodyInit
RequestRedirect
RequestCredentials
RequestMode
ReferrerPolicy
While it is true that the types are usable from Node code directly because of TypeScript's structural typing, library code targeting both browser and Node might reference those types which will lead to compilation errors or the need to use
skipLibCheck: true
intsconfig.json
.An example of an issue with library code: sindresorhus/ky#578
Beta Was this translation helpful? Give feedback.
All reactions