|
| 1 | +/** @typedef {import('webpack').Compiler} Compiler */ |
| 2 | +/** @typedef {import('./getOptions').Options} Options */ |
| 3 | +/** @typedef {import('./linter').Lint} Lint */ |
| 4 | +/** @typedef {import('./linter').LinterCallback} LinterCallback */ |
| 5 | +/** @typedef {Partial<{timestamp:number} | number>} FileSystemInfoEntry */ |
| 6 | +export default class LintDirtyModulesPlugin { |
| 7 | + /** |
| 8 | + * @param {Lint} lint |
| 9 | + * @param {Compiler} compiler |
| 10 | + * @param {Options} options |
| 11 | + */ |
| 12 | + constructor(lint: Lint, compiler: Compiler, options: Options); |
| 13 | + lint: import('./linter').Lint; |
| 14 | + compiler: import('webpack').Compiler; |
| 15 | + options: import('./getOptions').Options; |
| 16 | + startTime: number; |
| 17 | + prevTimestamps: Map<any, any>; |
| 18 | + isFirstRun: boolean; |
| 19 | + /** |
| 20 | + * @param {Compiler} compilation |
| 21 | + * @param {LinterCallback} callback |
| 22 | + * @returns {void} |
| 23 | + */ |
| 24 | + apply(compilation: Compiler, callback: LinterCallback): void; |
| 25 | + /** |
| 26 | + * @param {Map<string, number>} fileTimestamps |
| 27 | + * @param {string | ReadonlyArray<string>} glob |
| 28 | + * @returns {Array<string>} |
| 29 | + */ |
| 30 | + getChangedFiles( |
| 31 | + fileTimestamps: Map<string, number>, |
| 32 | + glob: string | ReadonlyArray<string> |
| 33 | + ): Array<string>; |
| 34 | +} |
| 35 | +export type Compiler = import('webpack').Compiler; |
| 36 | +export type Options = { |
| 37 | + context?: string | undefined; |
| 38 | + emitError?: boolean | undefined; |
| 39 | + emitWarning?: boolean | undefined; |
| 40 | + failOnError?: boolean | undefined; |
| 41 | + failOnWarning?: boolean | undefined; |
| 42 | + files: string | string[]; |
| 43 | + formatter: TimerHandler; |
| 44 | + lintDirtyModulesOnly?: boolean | undefined; |
| 45 | + quiet?: boolean | undefined; |
| 46 | + stylelintPath: string; |
| 47 | +}; |
| 48 | +export type Lint = ( |
| 49 | + options: import('./getOptions').Options |
| 50 | +) => Promise<import('stylelint').LinterResult>; |
| 51 | +export type LinterCallback = ( |
| 52 | + error?: import('./StylelintError').default | null | undefined |
| 53 | +) => void; |
| 54 | +export type FileSystemInfoEntry = |
| 55 | + | number |
| 56 | + | Partial<{ |
| 57 | + timestamp: number; |
| 58 | + }>; |
0 commit comments