DefinitelyTyped/types/sass-webpack-plugin/index.d.ts
AEPKILL 385efad406 Type definitions for sass-webpack-plugin 1.0.0 (#23898)
* finish

* add tslint

* pass lint

* fix some error

* fix export error
2018-02-26 08:42:37 -08:00

33 lines
856 B
TypeScript

// Type definitions for sass-webpack-plugin 1.0
// Project: https://github.com/jalkoby/sass-webpack-plugin
// Definitions by: AEPKILL <https://github.com/AepKill>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
import { Options } from 'node-sass';
import { Plugin } from 'webpack';
declare namespace SassPlugin {
type NODE_ENV = 'production' | 'development';
type FileRule = string | string[] | { [key: string]: string };
interface Config {
sourceMap?: boolean;
autoprefixer?: boolean;
sass?: Options;
}
}
declare class SassPlugin extends Plugin {
constructor(
file: SassPlugin.FileRule,
mode?: SassPlugin.NODE_ENV | SassPlugin.Config
);
constructor(
file: SassPlugin.FileRule,
mode: SassPlugin.NODE_ENV,
config?: SassPlugin.Config
);
}
export = SassPlugin;