@types/license-checker-webpack-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.2.4 • Public • Published

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

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;

    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: Tue, 07 Nov 2023 09:09:38 GMT
  • Dependencies: @types/webpack

Credits

These definitions were written by .

Readme

Keywords

none

Package Sidebar

Install

npm i @types/license-checker-webpack-plugin

Weekly Downloads

10,168

Version

0.2.4

License

MIT

Unpacked Size

6.78 kB

Total Files

5

Last publish

Collaborators

  • types