-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add polyfill for
node:https
with named exports
resolves #92
- Loading branch information
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// https://nodejs.org/api/https.html | ||
import type nodeHttps from "node:https"; | ||
import { notImplemented, notImplementedClass } from "../../_internal/utils"; | ||
|
||
export const Server: typeof nodeHttps.Server = | ||
notImplementedClass("https.Server"); | ||
|
||
export const Agent: typeof nodeHttps.Agent = notImplementedClass("https.Agent"); | ||
|
||
export const globalAgent = undefined as any as typeof nodeHttps.globalAgent; | ||
|
||
export const get: typeof nodeHttps.get = notImplemented("https.get"); | ||
|
||
export const createServer: typeof nodeHttps.createServer = | ||
notImplemented("https.createServer"); | ||
|
||
export const request: typeof nodeHttps.request = | ||
notImplemented("https.request"); | ||
|
||
export default <typeof nodeHttps>{ | ||
Server, | ||
Agent, | ||
globalAgent, | ||
get, | ||
createServer, | ||
request, | ||
}; |