Skip to content

Commit

Permalink
refactor: use native Headers and Response for legacy polyfills (#523
Browse files Browse the repository at this point in the history
)
  • Loading branch information
pi0 authored Aug 26, 2023
1 parent f85c497 commit e21d6ee
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 135 deletions.
11 changes: 11 additions & 0 deletions src/event/_polyfills.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* @deprecated Please use native web Headers
* https://developer.mozilla.org/en-US/docs/Web/API/Headers
*/
export const H3Headers = globalThis.Headers;

/**
* @deprecated Please use native web Response
* https://developer.mozilla.org/en-US/docs/Web/API/Response
*/
export const H3Response = globalThis.Response;
5 changes: 1 addition & 4 deletions src/event/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
export * from "./event";
export * from "./utils";

// TODO: Drop in next major version
export * from "./polyfills/headers";
export * from "./polyfills/response";
export * from "./_polyfills";
68 changes: 0 additions & 68 deletions src/event/polyfills/headers.ts

This file was deleted.

63 changes: 0 additions & 63 deletions src/event/polyfills/response.ts

This file was deleted.

0 comments on commit e21d6ee

Please sign in to comment.