Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ const schema = require("./options.json");
* @property {boolean} [magicHtml]
* @property {"auto" | "all" | string | string[]} [allowedHosts]
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
* @property {boolean} [setupExitSignals]
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
* @property {boolean | string | Static | Array<string | Static>} [static]
Expand Down
93 changes: 38 additions & 55 deletions types/lib/Server.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ declare class Server {
* @property {boolean} [magicHtml]
* @property {"auto" | "all" | string | string[]} [allowedHosts]
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
* @property {boolean} [setupExitSignals]
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
* @property {boolean | string | Static | Array<string | Static>} [static]
Expand Down Expand Up @@ -340,7 +339,6 @@ declare class Server {
* @property {boolean} [magicHtml]
* @property {"auto" | "all" | string | string[]} [allowedHosts]
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
* @property {boolean} [setupExitSignals]
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
* @property {boolean | string | Static | Array<string | Static>} [static]
Expand Down Expand Up @@ -467,7 +465,6 @@ declare class Server {
* @property {boolean} [magicHtml]
* @property {"auto" | "all" | string | string[]} [allowedHosts]
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
* @property {boolean} [setupExitSignals]
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
* @property {boolean | string | Static | Array<string | Static>} [static]
Expand Down Expand Up @@ -562,10 +559,6 @@ declare class Server {
description: string;
path: string;
}[];
/**
* @param {Configuration | Compiler | MultiCompiler} options
* @param {Compiler | MultiCompiler | Configuration} compiler
*/
description: string;
simpleType: string;
multiple: boolean;
Expand All @@ -591,19 +584,12 @@ declare class Server {
description: string;
simpleType: string;
multiple: boolean;
/**
* @type {FSWatcher[]}
*/
};
"client-web-socket-url-port": {
configs: {
type: string;
multiple: boolean;
description: string;
/**
* @private
* @type {RequestHandler[]}
*/
path: string;
}[];
description: string;
Expand Down Expand Up @@ -766,13 +752,13 @@ declare class Server {
"https-cacert-reset": {
configs: {
description: string;
/** @type {string} */
multiple: boolean;
path: string;
type: string;
}[];
description: string;
multiple: boolean;
/** @type {ServerConfiguration} */
simpleType: string;
};
"https-cert": {
Expand All @@ -783,7 +769,7 @@ declare class Server {
path: string;
}[];
description: string;
/** @type {string} */ simpleType: string;
simpleType: string;
multiple: boolean;
};
"https-cert-reset": {
Expand Down Expand Up @@ -881,6 +867,12 @@ declare class Server {
description: string;
negatedDescription: string;
path: string;
/**
* prependEntry Method for webpack 4
* @param {any} originalEntry
* @param {any} newAdditionalEntries
* @returns {any}
*/
}[];
description: string;
simpleType: string;
Expand All @@ -906,7 +898,6 @@ declare class Server {
simpleType: string;
multiple: boolean;
};
/** @type {Object<string,string>} */
"live-reload": {
configs: {
type: string;
Expand All @@ -915,6 +906,7 @@ declare class Server {
negatedDescription: string;
path: string;
}[];
/** @type {any} */
description: string;
simpleType: string;
multiple: boolean;
Expand All @@ -936,7 +928,7 @@ declare class Server {
| {
type: string;
multiple: boolean;
description: string;
/** @type {MultiCompiler} */ description: string;
path: string;
}
| {
Expand Down Expand Up @@ -968,14 +960,14 @@ declare class Server {
multiple: boolean;
description: string;
path: string;
/**
* @private
* @returns {Promise<void>}
*/
}[];
description: string;
simpleType: string;
multiple: boolean;
/**
* @param {WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} watchOptions
* @returns {WatchOptions}
*/
};
"open-app-name-reset": {
configs: {
Expand Down Expand Up @@ -1206,7 +1198,7 @@ declare class Server {
}[];
description: string;
multiple: boolean;
simpleType: string;
simpleType: string /** @type {ServerOptions} */;
};
static: {
configs: (
Expand All @@ -1219,7 +1211,7 @@ declare class Server {
| {
type: string;
multiple: boolean;
description: string;
/** @type {ServerOptions} */ description: string;
negatedDescription: string;
path: string;
}
Expand All @@ -1231,15 +1223,11 @@ declare class Server {
"static-directory": {
configs: {
type: string;
multiple: boolean;
/** @type {any} */ multiple: boolean;
description: string;
path: string;
}[];
description: string;
/**
* @param {string | Buffer | undefined} item
* @returns {string | Buffer | undefined}
*/
simpleType: string;
multiple: boolean;
};
Expand All @@ -1251,8 +1239,8 @@ declare class Server {
path: string;
}[];
description: string;
simpleType: string;
multiple: boolean /** @type {any} */;
/** @type {any} */ simpleType: string;
multiple: boolean;
};
"static-public-path-reset": {
configs: {
Expand Down Expand Up @@ -1369,7 +1357,7 @@ declare class Server {
description: string;
simpleType: string;
multiple: boolean;
};
} /** @type {ServerOptions} */;
};
readonly processArguments: (
args: Record<string, import("../bin/process-arguments").Argument>,
Expand Down Expand Up @@ -1588,7 +1576,6 @@ declare class Server {
* @property {boolean} [magicHtml]
* @property {"auto" | "all" | string | string[]} [allowedHosts]
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
* @property {boolean} [setupExitSignals]
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
* @property {boolean | string | Static | Array<string | Static>} [static]
Expand Down Expand Up @@ -1745,7 +1732,6 @@ declare class Server {
* @property {boolean} [magicHtml]
* @property {"auto" | "all" | string | string[]} [allowedHosts]
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
* @property {boolean} [setupExitSignals]
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
* @property {boolean | string | Static | Array<string | Static>} [static]
Expand Down Expand Up @@ -1813,7 +1799,6 @@ declare class Server {
* @property {boolean} [magicHtml]
* @property {"auto" | "all" | string | string[]} [allowedHosts]
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
* @property {boolean} [setupExitSignals]
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
* @property {boolean | string | Static | Array<string | Static>} [static]
Expand Down Expand Up @@ -1929,10 +1914,6 @@ declare class Server {
cli: {
negatedDescription: string;
};
/**
* @private
* @type {RequestHandler[]}
*/
};
ca: {
anyOf: (
Expand Down Expand Up @@ -2191,13 +2172,15 @@ declare class Server {
cli: {
negatedDescription: string;
};
description?: undefined;
/** @type {WebSocketURL} */ description?: undefined;
link?: undefined;
}
| {
type: string;
/** @type {WebSocketURL} */ description: string;
/** @type {ClientConfiguration} */
description: string;
link: string;
/** @type {{ type: WebSocketServerConfiguration["type"], options: NonNullable<WebSocketServerConfiguration["options"]> }} */
cli?: undefined /** @typedef {import("express").Request} Request */;
}
)[];
Expand All @@ -2210,7 +2193,7 @@ declare class Server {
anyOf: (
| {
enum: string[];
/** @type {ServerConfiguration} */ type?: undefined;
type?: undefined;
minLength?: undefined;
}
| {
Expand Down Expand Up @@ -2283,7 +2266,7 @@ declare class Server {
OnListening: {
instanceof: string;
description: string;
link: string;
/** @type {string} */ link: string;
};
Open: {
anyOf: (
Expand Down Expand Up @@ -2381,12 +2364,6 @@ declare class Server {
};
};
};
/**
* prependEntry Method for webpack 4
* @param {any} originalEntry
* @param {any} newAdditionalEntries
* @returns {any}
*/
OpenString: {
type: string;
minLength: number;
Expand Down Expand Up @@ -2441,7 +2418,6 @@ declare class Server {
}
)[];
description: string;
/** @type {any} */
link: string;
};
Server: {
Expand Down Expand Up @@ -2620,6 +2596,10 @@ declare class Server {
)[];
description: string;
};
/**
* @param {string | Static | undefined} [optionsForStatic]
* @returns {NormalizedStatic}
*/
key: {
anyOf: (
| {
Expand All @@ -2641,7 +2621,7 @@ declare class Server {
additionalProperties: boolean;
instanceof?: undefined;
}
)[];
)[] /** @type {NormalizedStatic} */;
};
instanceof?: undefined;
}
Expand Down Expand Up @@ -2905,7 +2885,7 @@ declare class Server {
};
};
WebSocketServerFunction: {
instanceof: string /** @type {ServerOptions} */;
instanceof: string;
};
WebSocketServerObject: {
type: string;
Expand Down Expand Up @@ -2940,6 +2920,10 @@ declare class Server {
};
client: {
$ref: string;
/**
* @param {string | Buffer | undefined} item
* @returns {string | Buffer | undefined}
*/
};
compress: {
$ref: string;
Expand Down Expand Up @@ -2974,15 +2958,14 @@ declare class Server {
magicHtml: {
$ref: string;
};
/** @type {any} */
onAfterSetupMiddleware: {
$ref: string;
};
onBeforeSetupMiddleware: {
$ref: string;
};
onListening: {
$ref: string;
$ref: string /** @type {ServerOptions} */;
};
open: {
$ref: string;
Expand Down Expand Up @@ -3405,7 +3388,6 @@ type Configuration = {
| boolean
| import("connect-history-api-fallback").Options
| undefined;
setupExitSignals?: boolean | undefined;
bonjour?:
| boolean
| Record<string, never>
Expand All @@ -3424,6 +3406,7 @@ type Configuration = {
webSocketServer?: string | boolean | WebSocketServerConfiguration | undefined;
proxy?: ProxyConfigArrayItem | ProxyConfigMap | ProxyConfigArray | undefined;
open?: string | boolean | Open | (string | Open)[] | undefined;
setupExitSignals?: boolean | undefined;
client?: boolean | ClientConfiguration | undefined;
headers?:
| Headers
Expand Down