@types/gulp-insert
Version:
TypeScript definitions for gulp-insert
64 lines (51 loc) • 1.96 kB
Markdown
# Installation
> `npm install --save @types/gulp-insert`
# Summary
This package contains type definitions for gulp-insert (https://github.com/rschmukler/gulp-insert).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gulp-insert.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gulp-insert/index.d.ts)
````ts
/// <reference types="node"/>
/// <reference types="vinyl"/>
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;
}
namespace Insert {}
export = Insert;
}
````
### Additional Details
* Last updated: Tue, 07 Nov 2023 03:09:37 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node), [@types/vinyl](https://npmjs.com/package/@types/vinyl)
# Credits
These definitions were written by [Shant Marouti](https://github.com/shantmarouti).