Skip to content

Commit

Permalink
🤖 Merge PR #67341 [node] Expose global ResponseInit; remove NodeJS.fe…
Browse files Browse the repository at this point in the history
…tch namespace by @thw0rted

* [node] Expose global ResponseInit; remove NodeJS.fetch namespace

* [node] include global File for v20 only

* Update types/node/test/globals.ts

Remove trailing whitespace

---------

Co-authored-by: Ryan Cavanaugh <RyanCavanaugh@users.noreply.github.com>
  • Loading branch information
thw0rted and RyanCavanaugh committed Dec 1, 2023
1 parent 2fb3dd0 commit c788615
Show file tree
Hide file tree
Showing 8 changed files with 1,391 additions and 1,376 deletions.
689 changes: 347 additions & 342 deletions types/node/globals.d.ts

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions types/node/test/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ declare var RANDOM_GLOBAL_VARIABLE: true;
dispatcher: undefined,
});

// @ts-expect-error
NodeJS.fetch;
const reqinit: RequestInit = {};
reqinit.method; // $ExpectType string | undefined
const resinit: ResponseInit = {};
resinit.status; // $ExpectType number | undefined

const f: File = {} as any;
f.name; // $ExpectType string
}

0 comments on commit c788615

Please sign in to comment.