@types/license-checker-webpack-plugin
Version:
TypeScript definitions for license-checker-webpack-plugin
95 lines (77 loc) • 2.82 kB
Markdown
# Installation
> `npm install --save @types/license-checker-webpack-plugin`
# Summary
This package contains type definitions for license-checker-webpack-plugin (https://github.com/Microsoft/license-checker-webpack-plugin#readme).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/license-checker-webpack-plugin.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/license-checker-webpack-plugin/index.d.ts)
````ts
import { Compiler, WebpackPluginInstance } from "webpack";
declare class LicenseCheckerWebpackPlugin implements WebpackPluginInstance {
constructor(options?: Partial<LicenseCheckerWebpackPlugin.Options>);
apply(compiler: Compiler): void;
}
declare namespace LicenseCheckerWebpackPlugin {
interface Dependency {
name: string;
version: string;
repository?: string;
author?: string;
licenseName: string;
licenseText?: string;
}
interface OutputWriterArgs {
dependencies: Dependency[];
}
type OutputWriter = (args: OutputWriterArgs) => string | Promise<string>;
interface Options {
/**
* Regular expression that matches the file paths of dependencies to check.
*/
filter: RegExp;
/**
* SPDX expression with allowed licenses.
*
* @default "(Apache-2.0 OR BSD-2-Clause OR BSD-3-Clause OR MIT)"
*/
allow: string;
/**
* Array of dependencies to ignore, in the format `["<dependency name>@<version range>"]`.
* For example, `["assignment@^2.0.0"]`.
*
* @default []
*/
ignore: string[];
/**
* Object of dependencies to override, in the format `{"<dependency name>@<version range>": { ... }}`.
* For example, `{"assignment@^2.0.0": { licenseName: "MIT" }}`.
*
* @default {}
*/
override: Record<string, Partial<Dependency>>;
/**
* Whether to emit errors instead of warnings.
*
* @default false
*/
emitError: boolean;
/**
* Path to a `.ejs` template, or function that will generate the contents
* of the third-party notices file.
*/
outputWriter: string | OutputWriter;
/**
* Name of the third-party notices file with all licensing information.
*
* @default "ThirdPartyNotices.txt"
*/
outputFilename: string;
}
}
export = LicenseCheckerWebpackPlugin;
````
### Additional Details
* Last updated: Sat, 14 Jun 2025 22:02:18 GMT
* Dependencies: [@types/webpack](https://npmjs.com/package/@types/webpack)
# Credits
These definitions were written by .