DefinitelyTyped/gulp-insert/gulp-insert.d.ts
Shant Marouti fc595bd854 Add definitions for app-root-path and gulp-insert (#10118)
* add app-root-path type difinitions

* Add defenitions for gulp-insert
2016-07-19 16:23:27 -07:00

52 lines
1.5 KiB
TypeScript

// Type definitions for gulp-insert 0.5.0
// Project: https://github.com/rschmukler/gulp-insert
// Definitions by: Shant Marouti <https://github.com/shantmarouti>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../node/node.d.ts"/>
/// <reference path="../vinyl/vinyl.d.ts"/>
declare module 'gulp-insert' {
import File = require('vinyl');
interface Transformer {
(contents: string, file: File): string
}
namespace Insert {
/**
* Prepends a string onto the contents
* @param {string} content
* @returns {NodeJS.ReadWriteStream}
*/
function prepend(content: string): NodeJS.ReadWriteStream;
/**
* Appends a string onto the contents
* @param {string} content
* @returns {NodeJS.ReadWriteStream}
*/
function append(content: string): NodeJS.ReadWriteStream;
/**
* Wraps the contents with two strings
* @param {string} prepend
* @param {string} append
* @returns {NodeJS.ReadWriteStream}
*/
function wrap(prepend: string, append: string): NodeJS.ReadWriteStream;
/**
* Calls a function with the contents of the file
* @param {Transformer} transformer
* @returns {NodeJS.ReadWriteStream}
*/
function transform(transformer: Transformer): NodeJS.ReadWriteStream;
}
module Insert { }
export = Insert;
}