5.0.4 • Published 6 months ago

@types/worker-plugin v5.0.4

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

Installation

npm install --save @types/worker-plugin

Summary

This package contains type definitions for worker-plugin (https://github.com/GoogleChromeLabs/worker-plugin).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/worker-plugin.

index.d.ts

// Type definitions for worker-plugin 5.0
// Project: https://github.com/GoogleChromeLabs/worker-plugin
// Definitions by: Artur Androsovych <https://github.com/arturovt>
//                 Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.7

import * as webpack from 'webpack';

export = WorkerPlugin;

declare class WorkerPlugin extends webpack.Plugin {
    constructor(options?: WorkerPlugin.Options);
}

declare namespace WorkerPlugin {
    interface Options {
        filename?: string | undefined;
        chunkFilename?: string | undefined;
        globalObject?: false | string | undefined;
        plugins?: Array<string | webpack.Plugin> | undefined;
        /**
         * If set to `true`, this option enables the bundling of [SharedWorker](https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker)
         */
        sharedWorker?: boolean | undefined;
        /**
         * If set to `false`, this option disables the bundling of [Worker].
         * Intended to be used with `{ sharedWorker: true }` to allow bundling of [SharedWorker] only without also bundling [Worker].
         */
        worker?: boolean | undefined;
        preserveTypeModule?: boolean | undefined;
        /**
         * Normally, WorkerPlugin will transform `new Worker('./a.js', { type: 'module' })`
         * to completely remove the `type` option, outputting something like `new Worker('a.worker.js')`.
         * This allows the plugin to compile Module Workers to Classic Workers, which are supported in all browsers.
         */
        workerType?: string | undefined;
    }
}

Additional Details

  • Last updated: Fri, 02 Jul 2021 18:06:01 GMT
  • Dependencies: @types/webpack
  • Global values: none

Credits

These definitions were written by Artur Androsovych, and Piotr Błażejewicz.

5.0.4

6 months ago

5.0.3

7 months ago

5.0.2

8 months ago

5.0.1

3 years ago

5.0.0

3 years ago

4.0.1

3 years ago

4.0.0

4 years ago

3.2.0

4 years ago