0.2.4 • Published 6 months ago

@types/license-checker-webpack-plugin v0.2.4

Weekly downloads
3,552
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for license-checker-webpack-plugin 0.2
// Project: https://github.com/Microsoft/license-checker-webpack-plugin#readme
// Definitions by: DefinitelyTyped <https://github.com/DefinitelyTyped>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.7

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: Thu, 23 Dec 2021 23:35:02 GMT
  • Dependencies: @types/webpack
  • Global values: none

Credits

These definitions were written by DefinitelyTyped.

0.2.3

7 months ago

0.2.2

9 months ago

0.2.4

6 months ago

0.2.1

2 years ago

0.2.0

2 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

5 years ago

0.0.1

5 years ago

0.0.0

5 years ago