forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgoogle-closure-compiler.d.ts
38 lines (31 loc) · 1.21 KB
/
google-closure-compiler.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Type definitions for google-closure-compiler
// Project: https://github.com/chadkillingsworth/closure-compiler-npm
// Definitions by: Evan Martin <http://neugierig.org>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module 'google-closure-compiler' {
import * as child_process from 'child_process';
// The "json_streams" compiler flag lets the compiler accept/produce
// arrays of JSON objects in this shape for input/output.
interface JSONStreamFile {
path: string;
src: string;
srcmap?: string; // TODO(evan): pass through source maps.
}
interface Compiler {
javaPath: string;
logger: (...args: any[]) => void;
spawnOptions: {[key:string]: string};
run(callback?: (exitCode: number, stdout: string, stderr: string) => void):
child_process.ChildProcess;
getFullCommand(): string;
}
type CompileOptions = {[key: string]: string};
var compiler: {
new (opts: (CompileOptions|string[]),
extraCommandArgs?: string[]): Compiler;
JAR_PATH: string;
COMPILER_PATH: string;
CONTRIB_PATH: string;
};
}