@types/gulp-cache
TypeScript definitions for gulp-cache
Last updated 9 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/gulp-cache 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/gulp-cache

Summary

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

Details

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

index.d.ts

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

import File = require("vinyl");
import { PluginError } from "gulp-util";
import { Transform } from "stream";

declare namespace gc {
    type Predicate<T> = (arg: T) => boolean;

    interface IGulpCacheOptions {
        /**
         * The cache instance to use for caching.
         */
        fileCache?: IGulpCache | undefined;

        /**
         * The name of the bucket which stores the cached objects.
         * Default value = 'default'
         */
        name?: string | undefined;

        /**
         * The hash generator to use.
         */
        key?: ((file: File, callback?: (err: any, result: string) => void) => string | Promise<string>) | undefined;

        /**
         * Value representing the success of a task.
         */
        success?: boolean | Predicate<any> | undefined;

        /**
         * Content that is to be cached.
         */
        value?: ((result: any) => Object | Promise<Object> | string) | undefined;
    }

    interface ICacheOptions {
        /**
         * Specifies the name of the directory where the cache
         * is to be stored.
         */
        cacheDirName: string;
    }

    interface IGulpCacheStatic {
        /**
         * Caches the result of a task.
         * @param task The task whose result is to be cached.
         */
        (task: NodeJS.ReadWriteStream): Transform;

        /**
         * Caches the result of a task.
         * @param task Task whose result is to be cached.
         * @param options Override values for available settings.
         */
        (task: NodeJS.ReadWriteStream, options: IGulpCacheOptions): Transform;

        clear(options: IGulpCacheOptions): Transform;

        /**
         * Represents a cache store.
         */
        Cache: IGulpCache;

        /**
         * Purges the cache.
         * @param err PluginError instance in case of a plugin error.
         *            If callback is not specified an exception of type
         *            'PluginError' is thrown.
         */
        clearAll(callback?: (err: PluginError) => void): void;
    }

    /**
     * Represents a cach store.
     */
    interface IGulpCache {
        new(options: ICacheOptions): any;
    }
}

declare const _: gc.IGulpCacheStatic;
export = _;

Additional Details

Credits

These definitions were written by Arun Aravind.

Current Tags

  • 0.4.9                                ...           latest (2 years ago)
  • 0.4.4                                ...           ts2.0 (8 years ago)
  • 0.4.4                                ...           ts2.1 (8 years ago)
  • 0.4.4                                ...           ts2.2 (8 years ago)
  • 0.4.4                                ...           ts2.3 (8 years ago)
  • 0.4.4                                ...           ts2.4 (8 years ago)
  • 0.4.4                                ...           ts2.5 (8 years ago)
  • 0.4.4                                ...           ts2.6 (8 years ago)
  • 0.4.4                                ...           ts2.7 (8 years ago)
  • 0.4.4                                ...           ts2.8 (8 years ago)
  • 0.4.4                                ...           ts2.9 (8 years ago)
  • 0.4.4                                ...           ts3.0 (8 years ago)
  • 0.4.4                                ...           ts3.1 (8 years ago)
  • 0.4.4                                ...           ts3.2 (8 years ago)
  • 0.4.4                                ...           ts3.3 (8 years ago)
  • 0.4.4                                ...           ts3.4 (8 years ago)
  • 0.4.4                                ...           ts3.5 (8 years ago)
  • 0.4.5                                ...           ts3.6 (5 years ago)
  • 0.4.5                                ...           ts3.7 (5 years ago)
  • 0.4.5                                ...           ts3.8 (5 years ago)
  • 0.4.5                                ...           ts3.9 (5 years ago)
  • 0.4.5                                ...           ts4.0 (5 years ago)
  • 0.4.5                                ...           ts4.1 (5 years ago)
  • 0.4.5                                ...           ts4.2 (5 years ago)
  • 0.4.6                                ...           ts4.3 (3 years ago)
  • 0.4.6                                ...           ts4.4 (3 years ago)
  • 0.4.9                                ...           ts4.5 (2 years ago)
  • 0.4.9                                ...           ts4.6 (2 years ago)
  • 0.4.9                                ...           ts4.7 (2 years ago)
  • 0.4.9                                ...           ts4.8 (2 years ago)
  • 0.4.9                                ...           ts4.9 (2 years ago)
  • 0.4.9                                ...           ts5.0 (2 years ago)
  • 0.4.9                                ...           ts5.1 (2 years ago)
  • 0.4.9                                ...           ts5.2 (2 years ago)
  • 0.4.9                                ...           ts5.3 (2 years ago)
  • 0.4.9                                ...           ts5.4 (2 years ago)
  • 0.4.9                                ...           ts5.5 (2 years ago)
  • 0.4.9                                ...           ts5.6 (2 years ago)
  • 0.4.9                                ...           ts5.7 (2 years ago)
  • 0.4.9                                ...           ts5.8 (2 years ago)
  • 0.4.9                                ...           ts5.9 (2 years ago)

9 Versions

  • 0.4.9                                ...           2 years ago
  • 0.4.8                                ...           2 years ago
  • 0.4.7                                ...           3 years ago
  • 0.4.6                                ...           3 years ago
  • 0.4.5                                ...           5 years ago
  • 0.4.4                                ...           8 years ago
  • 0.4.3                                ...           9 years ago
  • 0.4.2                                ...           9 years ago
  • 0.4.1                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org | Home |