$ cnpm install @types/webpackbar
npm install --save @types/webpackbar
This package contains type definitions for webpackbar (https://github.com/nuxt/webpackbar).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webpackbar/v2.
// Type definitions for webpackbar 2.6
// Project: https://github.com/nuxt/webpackbar
// Definitions by: Ryan Clark <https://github.com/rynclark>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.7
/// <reference types="node" />
import { Plugin } from 'webpack';
export = WebpackBar;
declare class WebpackBar extends Plugin {
constructor(options?: WebpackBar.Options);
state: WebpackBar.State;
}
declare namespace WebpackBar {
interface Stats {
count: number;
time: [number, number];
}
class Profile {
requests: any[];
name: string;
constructor(name: string);
getStats(): { ext: Stats, loader: Stats };
}
interface State {
isRunning: boolean;
color: string;
profile: Profile | null;
}
interface SharedState {
[name: string]: State;
}
interface Options {
/** Display name */
name?: string | undefined;
/** Color output of the progress bar */
color?: string | undefined;
/** Enable the profiler for files and loaders */
profile?: boolean | undefined;
/** Stream to write to */
stream?: NodeJS.WriteStream | undefined;
/** Minimal output */
minimal?: boolean | undefined;
/** Show compiled in time */
compiledIn?: boolean | undefined;
/** Function called when all builds are finished */
done?: ((sharedState: SharedState, ctx: WebpackBar) => void) | undefined;
}
}
These definitions were written by Ryan Clark.
Copyright 2013 - present © cnpmjs.org | Home |