@types/gulp-changed
TypeScript icon, indicating that this package has built-in type declarations

0.0.39 • Public • Published

Installation

npm install --save @types/gulp-changed

Summary

This package contains type definitions for gulp-changed (https://github.com/sindresorhus/gulp-changed).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gulp-changed.

index.d.ts

/// <reference types="node"/>
/// <reference types="vinyl" />

import { Transform } from "stream";
import File = require("vinyl");

interface IComparator {
    /**
     * @param stream Should be used to queue sourceFile if it passes some comparison
     * @param sourceFile File to operate on
     * @param destPath Destination for sourceFile as an absolute path
     */
    (stream: Transform, sourceFile: File, destPath: string): void;
}

interface IDestination {
    (file: string | Buffer): string;
}

interface IOptions {
    /**
     * The working directory the folder is relative to.
     * @default process.cwd()
     */
    cwd?: string | undefined;

    /**
     * Extension of the destination files.
     */
    extension?: string | undefined;

    /**
     * Function that determines whether the source file is different from the destination file.
     * @default changed.compareLastModifiedTime
     */
    hasChanged?: IComparator | undefined;

    /**
     * Function to transform the path to the destination file. Should return the absolute path to the (renamed) destination file.
     */
    transformPath?: ((destPath: string) => string) | undefined;
}

interface IGulpChanged {
    (destination: string | IDestination, options?: IOptions): NodeJS.ReadWriteStream;

    compareLastModifiedTime: IComparator;
    compareContents: IComparator;
}

declare const changed: IGulpChanged;
export = changed;

Additional Details

Credits

These definitions were written by Thomas Corbière, and Jordy van Dortmont.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/gulp-changed

Weekly Downloads

1,892

Version

0.0.39

License

MIT

Unpacked Size

5.8 kB

Total Files

5

Last publish

Collaborators

  • types