Skip to content

Commit

Permalink
chore: update types
Browse files Browse the repository at this point in the history
  • Loading branch information
ersachin3112 committed Jan 4, 2024
1 parent 11215b6 commit 30f4824
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,26 +108,6 @@ declare namespace CssMinimizerPlugin {
InternalPluginOptions,
};
}
type CssNanoOptionsExtended = CssNanoOptions & {
processorOptions?: ProcessOptionsExtender;
};
type Compiler = import("webpack").Compiler;
type BasePluginOptions = {
test?: Rule | undefined;
include?: Rule | undefined;
exclude?: Rule | undefined;
warningsFilter?: WarningsFilter | undefined;
parallel?: Parallel;
};
type DefinedDefaultMinimizerAndOptions<T> = T extends CssNanoOptionsExtended
? {
minify?: MinimizerImplementation<T> | undefined;
minimizerOptions?: MinimizerOptions<T> | undefined;
}
: {
minify: MinimizerImplementation<T>;
minimizerOptions?: MinimizerOptions<T> | undefined;
};
import { cssnanoMinify } from "./utils";
import { cssoMinify } from "./utils";
import { cleanCssMinify } from "./utils";
Expand All @@ -136,6 +116,7 @@ import { parcelCssMinify } from "./utils";
import { lightningCssMinify } from "./utils";
import { swcMinify } from "./utils";
type Schema = import("schema-utils/declarations/validate").Schema;
type Compiler = import("webpack").Compiler;
type Compilation = import("webpack").Compilation;
type WebpackError = import("webpack").WebpackError;
type JestWorker = import("jest-worker").Worker;
Expand Down Expand Up @@ -219,6 +200,13 @@ type WarningsFilter = (
file: string,
source?: string
) => boolean;
type BasePluginOptions = {
test?: Rule | undefined;
include?: Rule | undefined;
exclude?: Rule | undefined;
warningsFilter?: WarningsFilter | undefined;
parallel?: Parallel;
};
type MinimizerWorker<T> = import("jest-worker").Worker & {
transform: (options: string) => InternalResult;
minify: (options: InternalOptions<T>) => InternalResult;
Expand All @@ -232,6 +220,18 @@ type ProcessOptionsExtender =
stringifier?: string | Syntax | Stringifier;
syntax?: string | Syntax;
};
type CssNanoOptionsExtended = CssNanoOptions & {
processorOptions?: ProcessOptionsExtender;
};
type DefinedDefaultMinimizerAndOptions<T> = T extends CssNanoOptionsExtended
? {
minify?: MinimizerImplementation<T> | undefined;
minimizerOptions?: MinimizerOptions<T> | undefined;
}
: {
minify: MinimizerImplementation<T>;
minimizerOptions?: MinimizerOptions<T> | undefined;
};
type InternalPluginOptions<T> = BasePluginOptions & {
minimizer: {
implementation: MinimizerImplementation<T>;
Expand Down

0 comments on commit 30f4824

Please sign in to comment.