diff --git a/package.json b/package.json index 53fb8626a..371203932 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "@babel/preset-react": "^7.10.4", "@types/es-module-lexer": "^0.4.1", "@types/jest": "^27.4.0", - "@types/node": "^17.0.16", + "@types/node": "^18.15.11", "assemblyscript": "^0.19.16", "babel-loader": "^8.1.0", "benchmark": "^2.1.4", diff --git a/types.d.ts b/types.d.ts index a0a44dfeb..b1ec17297 100644 --- a/types.d.ts +++ b/types.d.ts @@ -82,7 +82,11 @@ import { WithStatement, YieldExpression } from "estree"; -import { ServerOptions as ServerOptionsImport } from "http"; +import { + IncomingMessage, + ServerOptions as ServerOptionsImport, + ServerResponse +} from "http"; import { ListenOptions, Server } from "net"; import { validate as validateFunction } from "schema-utils"; import { default as ValidationError } from "schema-utils/declarations/ValidationError"; @@ -6133,7 +6137,10 @@ declare interface LazyCompilationDefaultBackendOptions { /** * Specifies how to create the server handling the EventSource requests. */ - server?: ServerOptionsImport | ServerOptionsHttps | (() => typeof Server); + server?: + | ServerOptionsImport + | ServerOptionsHttps + | (() => typeof Server); } /** @@ -10888,9 +10895,10 @@ declare abstract class Serializer { serialize(obj?: any, context?: any): any; deserialize(value?: any, context?: any): any; } -type ServerOptionsHttps = SecureContextOptions & - TlsOptions & - ServerOptionsImport; +type ServerOptionsHttps< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse = typeof ServerResponse +> = SecureContextOptions & TlsOptions & ServerOptionsImport; declare class SharePlugin { constructor(options: SharePluginOptions); diff --git a/yarn.lock b/yarn.lock index 825afedb2..769c5dcd8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -986,16 +986,11 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== -"@types/node@*": +"@types/node@*", "@types/node@^18.15.11": version "18.15.11" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.11.tgz#b3b790f09cb1696cffcec605de025b088fa4225f" integrity sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q== -"@types/node@^17.0.16": - version "17.0.45" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190" - integrity sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw== - "@types/normalize-package-data@^2.4.0": version "2.4.1" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301"