mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
add Reporter definition
This commit is contained in:
@@ -37,4 +37,9 @@ gulp.task('scripts', function() {
|
||||
});
|
||||
gulp.task('watch', ['scripts'], function() {
|
||||
gulp.watch('lib/*.ts', ['scripts']);
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('scripts', function () {
|
||||
return gulp.src('lib/*.ts')
|
||||
.pipe(typescript(tsProject, undefined, typescript.reporter.fullReporter()));
|
||||
});
|
||||
|
||||
12
gulp-typescript/gulp-typescript.d.ts
vendored
12
gulp-typescript/gulp-typescript.d.ts
vendored
@@ -6,7 +6,7 @@
|
||||
/// <reference path="../node/node.d.ts"/>
|
||||
|
||||
declare module "gulp-typescript" {
|
||||
function GulpTypescript(params: GulpTypescript.Params, filters?: GulpTypescript.FilterSettings): GulpTypescript.CompilationStream;
|
||||
function GulpTypescript(params: GulpTypescript.Params, filters?: GulpTypescript.FilterSettings, reporter?: GulpTypescript.Reporter): GulpTypescript.CompilationStream;
|
||||
|
||||
module GulpTypescript {
|
||||
export function createProject(params: Params): Params;
|
||||
@@ -28,10 +28,20 @@ declare module "gulp-typescript" {
|
||||
referencedFrom?: string[];
|
||||
}
|
||||
|
||||
interface Reporter {
|
||||
error(error: any): void;
|
||||
}
|
||||
|
||||
interface CompilationStream extends NodeJS.ReadWriteStream {
|
||||
dts: NodeJS.ReadWriteStream;
|
||||
js: NodeJS.ReadWriteStream;
|
||||
}
|
||||
|
||||
module reporter {
|
||||
function nullReporter(): Reporter;
|
||||
function defaultReporter(): Reporter;
|
||||
function fullReporter(showFullFilename?: boolean): Reporter;
|
||||
}
|
||||
}
|
||||
|
||||
export = GulpTypescript;
|
||||
|
||||
Reference in New Issue
Block a user