mirror of https://github.com/webpack/webpack.git
add omitted types should include null
This commit is contained in:
parent
136b723023
commit
0105d7d3e6
|
@ -13,7 +13,7 @@ const asyncLib = require("neo-async");
|
||||||
/**
|
/**
|
||||||
* @template T
|
* @template T
|
||||||
* @callback Callback
|
* @callback Callback
|
||||||
* @param {Error=} err
|
* @param {(Error | null)=} err
|
||||||
* @param {T=} result
|
* @param {T=} result
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ const Stats = require("./Stats");
|
||||||
/**
|
/**
|
||||||
* @template T
|
* @template T
|
||||||
* @callback Callback
|
* @callback Callback
|
||||||
* @param {Error=} err
|
* @param {(Error | null)=} err
|
||||||
* @param {T=} result
|
* @param {T=} result
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ let inHandleResult = 0;
|
||||||
/**
|
/**
|
||||||
* @template T
|
* @template T
|
||||||
* @callback Callback
|
* @callback Callback
|
||||||
* @param {WebpackError=} err
|
* @param {(WebpackError | null)=} err
|
||||||
* @param {T=} result
|
* @param {T=} result
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -675,15 +675,12 @@ declare interface CallExpressionInfo {
|
||||||
getMembers: () => string[];
|
getMembers: () => string[];
|
||||||
}
|
}
|
||||||
declare interface CallbackAsyncQueue<T> {
|
declare interface CallbackAsyncQueue<T> {
|
||||||
(err?: WebpackError, result?: T): any;
|
(err?: null | WebpackError, result?: T): any;
|
||||||
}
|
}
|
||||||
declare interface CallbackCache<T> {
|
declare interface CallbackCache<T> {
|
||||||
(err?: null | WebpackError, result?: T): void;
|
(err?: null | WebpackError, result?: T): void;
|
||||||
}
|
}
|
||||||
declare interface CallbackFunction_1<T> {
|
declare interface CallbackFunction<T> {
|
||||||
(err?: Error, result?: T): any;
|
|
||||||
}
|
|
||||||
declare interface CallbackFunction_2<T> {
|
|
||||||
(err?: null | Error, result?: T): any;
|
(err?: null | Error, result?: T): any;
|
||||||
}
|
}
|
||||||
declare interface CallbackNormalErrorCache<T> {
|
declare interface CallbackNormalErrorCache<T> {
|
||||||
|
@ -1945,11 +1942,8 @@ declare class Compiler {
|
||||||
watchMode: boolean;
|
watchMode: boolean;
|
||||||
getCache(name: string): CacheFacade;
|
getCache(name: string): CacheFacade;
|
||||||
getInfrastructureLogger(name: string | (() => string)): WebpackLogger;
|
getInfrastructureLogger(name: string | (() => string)): WebpackLogger;
|
||||||
watch(
|
watch(watchOptions: WatchOptions, handler: CallbackFunction<Stats>): Watching;
|
||||||
watchOptions: WatchOptions,
|
run(callback: CallbackFunction<Stats>): void;
|
||||||
handler: CallbackFunction_2<Stats>
|
|
||||||
): Watching;
|
|
||||||
run(callback: CallbackFunction_2<Stats>): void;
|
|
||||||
runAsChild(
|
runAsChild(
|
||||||
callback: (
|
callback: (
|
||||||
err?: null | Error,
|
err?: null | Error,
|
||||||
|
@ -1958,12 +1952,9 @@ declare class Compiler {
|
||||||
) => any
|
) => any
|
||||||
): void;
|
): void;
|
||||||
purgeInputFileSystem(): void;
|
purgeInputFileSystem(): void;
|
||||||
emitAssets(
|
emitAssets(compilation: Compilation, callback: CallbackFunction<void>): void;
|
||||||
compilation: Compilation,
|
emitRecords(callback: CallbackFunction<void>): void;
|
||||||
callback: CallbackFunction_2<void>
|
readRecords(callback: CallbackFunction<void>): void;
|
||||||
): void;
|
|
||||||
emitRecords(callback: CallbackFunction_2<void>): void;
|
|
||||||
readRecords(callback: CallbackFunction_2<void>): void;
|
|
||||||
createChildCompiler(
|
createChildCompiler(
|
||||||
compilation: Compilation,
|
compilation: Compilation,
|
||||||
compilerName: string,
|
compilerName: string,
|
||||||
|
@ -1980,8 +1971,8 @@ declare class Compiler {
|
||||||
normalModuleFactory: NormalModuleFactory;
|
normalModuleFactory: NormalModuleFactory;
|
||||||
contextModuleFactory: ContextModuleFactory;
|
contextModuleFactory: ContextModuleFactory;
|
||||||
};
|
};
|
||||||
compile(callback: CallbackFunction_2<Compilation>): void;
|
compile(callback: CallbackFunction<Compilation>): void;
|
||||||
close(callback: CallbackFunction_2<void>): void;
|
close(callback: CallbackFunction<void>): void;
|
||||||
}
|
}
|
||||||
declare class ConcatSource extends Source {
|
declare class ConcatSource extends Source {
|
||||||
constructor(...args: (string | Source)[]);
|
constructor(...args: (string | Source)[]);
|
||||||
|
@ -7186,19 +7177,19 @@ declare class MultiCompiler {
|
||||||
intermediateFileSystem: IntermediateFileSystem;
|
intermediateFileSystem: IntermediateFileSystem;
|
||||||
getInfrastructureLogger(name?: any): WebpackLogger;
|
getInfrastructureLogger(name?: any): WebpackLogger;
|
||||||
setDependencies(compiler: Compiler, dependencies: string[]): void;
|
setDependencies(compiler: Compiler, dependencies: string[]): void;
|
||||||
validateDependencies(callback: CallbackFunction_2<MultiStats>): boolean;
|
validateDependencies(callback: CallbackFunction<MultiStats>): boolean;
|
||||||
runWithDependencies(
|
runWithDependencies(
|
||||||
compilers: Compiler[],
|
compilers: Compiler[],
|
||||||
fn: (compiler: Compiler, callback: CallbackFunction_2<MultiStats>) => any,
|
fn: (compiler: Compiler, callback: CallbackFunction<MultiStats>) => any,
|
||||||
callback: CallbackFunction_2<MultiStats>
|
callback: CallbackFunction<MultiStats>
|
||||||
): void;
|
): void;
|
||||||
watch(
|
watch(
|
||||||
watchOptions: WatchOptions | WatchOptions[],
|
watchOptions: WatchOptions | WatchOptions[],
|
||||||
handler: CallbackFunction_2<MultiStats>
|
handler: CallbackFunction<MultiStats>
|
||||||
): MultiWatching;
|
): MultiWatching;
|
||||||
run(callback: CallbackFunction_2<MultiStats>): void;
|
run(callback: CallbackFunction<MultiStats>): void;
|
||||||
purgeInputFileSystem(): void;
|
purgeInputFileSystem(): void;
|
||||||
close(callback: CallbackFunction_2<void>): void;
|
close(callback: CallbackFunction<void>): void;
|
||||||
}
|
}
|
||||||
declare interface MultiCompilerOptions {
|
declare interface MultiCompilerOptions {
|
||||||
/**
|
/**
|
||||||
|
@ -7220,7 +7211,7 @@ declare abstract class MultiWatching {
|
||||||
invalidate(callback?: any): void;
|
invalidate(callback?: any): void;
|
||||||
suspend(): void;
|
suspend(): void;
|
||||||
resume(): void;
|
resume(): void;
|
||||||
close(callback: CallbackFunction_1<void>): void;
|
close(callback: CallbackFunction<void>): void;
|
||||||
}
|
}
|
||||||
declare class NamedChunkIdsPlugin {
|
declare class NamedChunkIdsPlugin {
|
||||||
constructor(options?: any);
|
constructor(options?: any);
|
||||||
|
@ -11885,8 +11876,8 @@ declare interface WatcherInfo {
|
||||||
declare abstract class Watching {
|
declare abstract class Watching {
|
||||||
startTime: null | number;
|
startTime: null | number;
|
||||||
invalid: boolean;
|
invalid: boolean;
|
||||||
handler: CallbackFunction_1<Stats>;
|
handler: CallbackFunction<Stats>;
|
||||||
callbacks: CallbackFunction_1<void>[];
|
callbacks: CallbackFunction<void>[];
|
||||||
closed: boolean;
|
closed: boolean;
|
||||||
suspended: boolean;
|
suspended: boolean;
|
||||||
blocked: boolean;
|
blocked: boolean;
|
||||||
|
@ -11922,10 +11913,10 @@ declare abstract class Watching {
|
||||||
dirs: Iterable<string>,
|
dirs: Iterable<string>,
|
||||||
missing: Iterable<string>
|
missing: Iterable<string>
|
||||||
): void;
|
): void;
|
||||||
invalidate(callback?: CallbackFunction_1<void>): void;
|
invalidate(callback?: CallbackFunction<void>): void;
|
||||||
suspend(): void;
|
suspend(): void;
|
||||||
resume(): void;
|
resume(): void;
|
||||||
close(callback: CallbackFunction_1<void>): void;
|
close(callback: CallbackFunction<void>): void;
|
||||||
}
|
}
|
||||||
declare abstract class WeakTupleMap<T extends any[], V> {
|
declare abstract class WeakTupleMap<T extends any[], V> {
|
||||||
set(...args: [T, ...V[]]): void;
|
set(...args: [T, ...V[]]): void;
|
||||||
|
|
Loading…
Reference in New Issue