mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-31 11:07:32 +08:00
Merge pull request #16592 from skeskinen/edit-gulp-inject
[gulp-inject] export interfaces
This commit is contained in:
@@ -39,3 +39,9 @@ gulp.task("inject:transform", () => {
|
||||
}))
|
||||
.pipe(gulp.dest("build"));
|
||||
});
|
||||
|
||||
function createOptions(starttag: inject.ITagFunction): inject.IOptions {
|
||||
return {
|
||||
starttag: starttag
|
||||
};
|
||||
}
|
||||
|
||||
50
types/gulp-inject/index.d.ts
vendored
50
types/gulp-inject/index.d.ts
vendored
@@ -8,31 +8,31 @@
|
||||
|
||||
import File = require("vinyl");
|
||||
|
||||
interface ITagFunction {
|
||||
(targetExt: string, sourceExt: string): string;
|
||||
declare function inject(sources: NodeJS.ReadableStream, options?: inject.IOptions): NodeJS.ReadWriteStream;
|
||||
|
||||
declare namespace inject {
|
||||
interface ITagFunction {
|
||||
(targetExt: string, sourceExt: string): string;
|
||||
}
|
||||
|
||||
interface ITransformFunction {
|
||||
(filepath: string, file?: File, index?: number, length?: number, targetFile?: File): string;
|
||||
}
|
||||
|
||||
interface IOptions {
|
||||
ignorePath?: string | string[];
|
||||
relative?: boolean;
|
||||
addPrefix?: string;
|
||||
addSuffix?: string;
|
||||
addRootSlash?: boolean;
|
||||
name?: string;
|
||||
removeTags?: boolean;
|
||||
empty?: boolean;
|
||||
starttag?: string | ITagFunction;
|
||||
endtag?: string | ITagFunction;
|
||||
transform?: ITransformFunction;
|
||||
selfClosingTag?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
interface ITransformFunction {
|
||||
(filepath: string, file?: File, index?: number, length?: number, targetFile?: File): string;
|
||||
}
|
||||
|
||||
interface IOptions {
|
||||
ignorePath?: string | string[];
|
||||
relative?: boolean;
|
||||
addPrefix?: string;
|
||||
addSuffix?: string;
|
||||
addRootSlash?: boolean;
|
||||
name?: string;
|
||||
removeTags?: boolean;
|
||||
empty?: boolean;
|
||||
starttag?: string | ITagFunction;
|
||||
endtag?: string | ITagFunction;
|
||||
transform?: ITransformFunction;
|
||||
selfClosingTag?: boolean;
|
||||
}
|
||||
|
||||
declare function inject(sources: NodeJS.ReadableStream, options?: IOptions): NodeJS.ReadWriteStream;
|
||||
|
||||
declare namespace inject { }
|
||||
|
||||
export = inject;
|
||||
|
||||
Reference in New Issue
Block a user