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

2.0.14 • Public • Published

Installation

npm install --save @types/karma-webpack

Summary

This package contains type definitions for karma-webpack (https://github.com/webpack-contrib/karma-webpack).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/karma-webpack.

index.d.ts

import "karma";
import * as Webpack from "webpack";
import { Logger, Reporter } from "webpack-dev-middleware";

declare module "karma" {
    type Logger = (message?: any, ...optionalParams: any[]) => void;

    // Note: karma-webpack will set publicPath for us, so it is optional here.
    // Unfortuantely, Typescript doesn't let you overload properties, so
    // the entire definition is duplicated here.
    interface KarmaWebpackMiddlewareOptions /** extends webpackDevMiddleware.Options */ {
        noInfo?: boolean | undefined;
        quiet?: boolean | undefined;
        lazy?: boolean | undefined;
        watchOptions?: Webpack.Options.WatchOptions | undefined;
        publicPath?: string | undefined;
        index?: string | undefined;
        headers?: {
            [name: string]: string;
        } | undefined;
        stats?: Webpack.Options.Stats | undefined;
        reporter?: Reporter | null | undefined;
        serverSideRender?: boolean | undefined;

        log?: Logger | undefined;
        warn?: Logger | undefined;
        error?: Logger | undefined;
        filename?: string | undefined;
    }

    interface ConfigOptions {
        webpack: Webpack.Configuration;
        webpackMiddleware: KarmaWebpackMiddlewareOptions;
    }
}

Additional Details

Credits

These definitions were written by Matt Traynham.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/karma-webpack

Weekly Downloads

9,972

Version

2.0.14

License

MIT

Unpacked Size

5.42 kB

Total Files

5

Last publish

Collaborators

  • types