UNPKG

2.22 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/gulp-newer`
3
4# Summary
5This package contains type definitions for gulp-newer (https://github.com/tschaub/gulp-newer).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gulp-newer.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gulp-newer/index.d.ts)
10````ts
11/// <reference types="node"/>
12
13interface IDestinationOption {
14 /**
15 * Path to destination directory or file.
16 */
17 dest: string;
18}
19
20interface IExtOption {
21 /**
22 * Source files will be matched to destination files with the provided extension.
23 */
24 ext: string;
25}
26
27interface IMapOption {
28 /**
29 * Map relative source paths to relative destination paths.
30 */
31 map: (relativePath: string) => string;
32}
33
34interface IExtraOption {
35 /**
36 * An extra file, file glob, or list of extra files and/or globs, to check for updated time stamp(s).
37 * If any of these files are newer than the destination files, then all source files will be passed into the stream.
38 */
39 extra?: string | string[];
40}
41
42type ValidOptionPermutations =
43 | (IDestinationOption & Partial<IExtOption> & Partial<IMapOption>)
44 | (Partial<IDestinationOption> & Partial<IExtOption> & IMapOption);
45
46type IOptions = IExtraOption & ValidOptionPermutations;
47
48interface IGulpNewer {
49 /**
50 * Create a transform stream that passes through files whose modification time
51 * is more recent than the corresponding destination file's modification time.
52 * @param dest Path to destination directory or file.
53 */
54 (dest: string): NodeJS.ReadWriteStream;
55
56 /**
57 * Create a transform stream that passes through files whose modification time
58 * is more recent than the corresponding destination file's modification time.
59 */
60 (options: IOptions): NodeJS.ReadWriteStream;
61}
62
63declare const newer: IGulpNewer;
64export = newer;
65
66````
67
68### Additional Details
69 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
70 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
71
72# Credits
73These definitions were written by [Thomas Corbière](https://github.com/tomc974).
74
\No newline at end of file