mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 04:49:15 +08:00
42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
// Type definitions for gulp-inject
|
|
// Project: https://github.com/klei/gulp-inject
|
|
// Definitions by: Keita Kagurazaka <https://github.com/k-kagurazaka>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
/// <reference path="../node/node.d.ts" />
|
|
/// <reference path="../vinyl/vinyl.d.ts" />
|
|
|
|
declare module "gulp-inject" {
|
|
|
|
import File = require("vinyl");
|
|
|
|
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;
|
|
}
|
|
|
|
function inject(sources: NodeJS.ReadableStream, options?: IOptions): NodeJS.ReadWriteStream;
|
|
|
|
namespace inject {}
|
|
|
|
export = inject;
|
|
}
|