Skip to content

Commit 442a1eb

Browse files
committed
rename validate function to avoid conflict
1 parent b6693fe commit 442a1eb

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

generate-types-config.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module.exports = {
22
nameMapping: {
33
FsStats: /^Stats Import fs/,
4+
validateFunction: /^validate Import/,
45
Configuration: /^WebpackOptions /
56
},
67
exclude: [/^devServer in WebpackOptions /],

types.d.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ import {
7979
WithStatement,
8080
YieldExpression
8181
} from "estree";
82-
import { ValidationError, validate } from "schema-utils";
82+
import { ValidationError, validate as validateFunction } from "schema-utils";
8383
import { ValidationErrorConfiguration } from "schema-utils/declarations/validate";
8484
import {
8585
AsArray,
@@ -7181,7 +7181,7 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
71817181
declare interface NormalModuleLoaderContext<OptionsType> {
71827182
version: number;
71837183
getOptions(): OptionsType;
7184-
getOptions(schema: Parameters<typeof validate>[0]): OptionsType;
7184+
getOptions(schema: Parameters<typeof validateFunction>[0]): OptionsType;
71857185
emitWarning(warning: Error): void;
71867186
emitError(error: Error): void;
71877187
getLogger(name?: string): WebpackLogger;
@@ -11929,8 +11929,8 @@ declare namespace exports {
1192911929
};
1193011930
export const validate: (options?: any) => void;
1193111931
export const validateSchema: (
11932-
schema: Parameters<typeof validate>[0],
11933-
options: Parameters<typeof validate>[1],
11932+
schema: Parameters<typeof validateFunction>[0],
11933+
options: Parameters<typeof validateFunction>[1],
1193411934
validationConfiguration?: ValidationErrorConfiguration
1193511935
) => void;
1193611936
export const version: string;

0 commit comments

Comments
 (0)