Skip to content

Commit

Permalink
fix: types (#4373)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Apr 6, 2022
1 parent 56410ba commit f6fe6be
Show file tree
Hide file tree
Showing 2 changed files with 446 additions and 298 deletions.
7 changes: 3 additions & 4 deletions lib/Server.js
Expand Up @@ -25,7 +25,6 @@ const schema = require("./options.json");
/** @typedef {import("express").NextFunction} NextFunction */
/** @typedef {import("express").RequestHandler} ExpressRequestHandler */
/** @typedef {import("express").ErrorRequestHandler} ExpressErrorRequestHandler */
/** @typedef {import("anymatch").Matcher} AnymatchMatcher */
/** @typedef {import("chokidar").WatchOptions} WatchOptions */
/** @typedef {import("chokidar").FSWatcher} FSWatcher */
/** @typedef {import("connect-history-api-fallback").Options} ConnectHistoryApiFallbackOptions */
Expand Down Expand Up @@ -65,7 +64,7 @@ const schema = require("./options.json");
/**
* @typedef {Object} WatchFiles
* @property {string | string[]} paths
* @property {WatchOptions & { aggregateTimeout?: number, ignored?: AnymatchMatcher | string[], poll?: number | boolean }} [options]
* @property {WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [options]
*/

/**
Expand All @@ -74,7 +73,7 @@ const schema = require("./options.json");
* @property {string | string[]} [publicPath]
* @property {boolean | ServeIndexOptions} [serveIndex]
* @property {ServeStaticOptions} [staticOptions]
* @property {boolean | WatchOptions & { aggregateTimeout?: number, ignored?: AnymatchMatcher | string[], poll?: number | boolean }} [watch]
* @property {boolean | WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [watch]
*/

/**
Expand Down Expand Up @@ -755,7 +754,7 @@ class Server {
// TODO remove `{}` after drop webpack v4 support
const compilerWatchOptions = compilerOptions.watchOptions || {};
/**
* @param {WatchOptions & { aggregateTimeout?: number, ignored?: AnymatchMatcher | string[], poll?: number | boolean }} watchOptions
* @param {WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} watchOptions
* @returns {WatchOptions}
*/
const getWatchOptions = (watchOptions = {}) => {
Expand Down

0 comments on commit f6fe6be

Please sign in to comment.