Files
DefinitelyTyped/google-closure-compiler/index.d.ts

38 lines
1.1 KiB
TypeScript

// 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 types="node" />
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 };
declare var compiler: {
new (opts: (CompileOptions | string[]),
extraCommandArgs?: string[]): Compiler;
JAR_PATH: string;
COMPILER_PATH: string;
CONTRIB_PATH: string;
};