11/* @flow */
22
33import type { ProgramData , ProgramDataCallback , StringOrErrorCallback , ResultOrErrorCallback , LiveReloadTrigger ,
4- ObjectOrErrorCallback , DevServerConfig , LintError , LintCallback , PostCSSWarning , NodeSassError } from '../src/typedef' ;
4+ ObjectOrErrorCallback , DevServerConfig , LintError , LintCallback , PostCSSWarning , NodeSassError ,
5+ WatchCallback , JSCompilerConfig , SASSCompilerConfig } from '../src/typedef' ;
56
67declare module 'webcompiler' {
78
@@ -28,7 +29,7 @@ declare module 'webcompiler' {
2829 declare function highlightArray(code: ?string): Array< string | Object > ;
2930 declare function highlightJSX(code: ?string): string;
3031
31- declare function watch(dir: string, type: string, callback: () = > void ) : void ;
32+ declare function watch(dir: string, type: string, callback: WatchCallback ): void;
3233 declare function yaml(filename: string, callback: ObjectOrErrorCallback): void;
3334 declare function findBinary(name: string, callback: ResultOrErrorCallback): void;
3435 declare function livereload(): LiveReloadTrigger;
@@ -81,7 +82,7 @@ declare module 'webcompiler' {
8182 }
8283
8384 declare class JSCompiler {
84- constructor ( compress : ?boolean ) : void ;
85+ constructor ( options : ?JSCompilerConfig ) : void ;
8586 be ( inPath : string , outPath : string , callback : ?( ) = > void ) : void ;
8687 fe ( inPath : string , outPath : string , callback : ?( ) = > void ) : void ;
8788 }
@@ -92,15 +93,15 @@ declare module 'webcompiler' {
9293 }
9394
9495 declare class SASSCompiler {
95- constructor ( compress : ?boolean , includePaths : ? string [ ] , importOnceOptions : ? Object ) : void ;
96+ constructor ( options : ?SASSCompilerConfig ) : void ;
9697 addPostcssPlugins ( ...plugins : any [ ] ) : SASSCompiler ;
9798 postcss ( path : string , data : ProgramData , callback : ProgramDataCallback ) : void ;
9899 fe ( inPath : string , outPath : string , callback : ?( ) = > void ) : void ;
99100 }
100101
101102 declare class JS {
102103 compiler : JSCompiler ;
103- constructor ( compress : ?boolean , configFile : ?string ) : void ;
104+ constructor ( options : ?JSCompilerConfig , configFile : ?string ) : void ;
104105 typecheck ( callback : ( ) = > void ) : void ;
105106 lint ( paths : string [ ] , callback : ( ) = > void ) : void ;
106107 be ( inPath : string , outPath : string , lintPaths : ?string [ ] , callback : ?( ) = > void ) : void ;
@@ -109,7 +110,7 @@ declare module 'webcompiler' {
109110
110111 declare class SASS {
111112 compiler : SASSCompiler ;
112- constructor ( compress : ?boolean , includePaths : ? string [ ] , configFile : ?string , importOnceOptions : ? Object ) : void ;
113+ constructor ( options : ?SASSCompilerConfig , configFile : ?string ) : void ;
113114 lint ( paths : string [ ] , callback : ( ) = > void ) : void ;
114115 fe ( inPath : string , outPath : string , lintPaths : ?string [ ] , callback : ?( ) = > void ) : void ;
115116 }
0 commit comments