forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulp-remember.d.ts
59 lines (51 loc) · 1.8 KB
/
gulp-remember.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Type definitions for gulp-remember
// Project: https://github.com/ahaurw01/gulp-remember
// Definitions by: Thomas Corbière <https://github.com/tomc974>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../node/node.d.ts"/>
declare module "gulp-remember"
{
interface ICache
{
[path: string]: NodeJS.ReadWriteStream;
}
interface IGulpRemember
{
/**
* Return a through stream that will:
* 1. Remember all files that ever pass through it.
* 2. Add all remembered files back into the stream when not present.
* @param cacheName Name to give your cache
*/
(cacheName?: string): NodeJS.ReadWriteStream;
/**
* Forget about a file.
* A warning is logged if either the named cache or file do not exist.
* @param path Path of the file to forget
*/
forget(path: string): void;
/**
* Forget about a file.
* A warning is logged if either the named cache or file do not exist.
* @param cacheName Name of the cache from which to drop the file
* @param path Path of the file to forget
*/
forget(cacheName: string, path: string): void;
/**
* Forget all files in one cache.
* A warning is logged if the cache does not exist.
*
* @param cacheName Name of the cache to wipe
*/
forgetAll(cacheName?: string): void;
/**
* Return a raw cache by name.
* Useful for checking state. Manually adding or removing files is NOT recommended.
*
* @param cacheName Name of the cache to retrieve
*/
cacheFor(cacheName?: string): ICache;
}
const remember: IGulpRemember;
export = remember;
}