DefinitelyTyped/types/gulp-zip/index.d.ts
Robert Bullen f00069b980 Adds to @types/gulp-zip the GulpZipOptions.modifiedTime option
* - change ObjectSchema<T>.shape() to ObjectSchema<T>.shape<U>()
- changed Schema.validate*() to accept any type
- made declaration of Ref more restrictive
- bumped definitions version

* Addressed PR feedback:
- refined `ObjectSchema.shape()` with `Shape<T, U>`
- added a few more test cases

* added `GulpZipOptions.modifiedTime`
2019-10-02 14:24:33 -07:00

33 lines
1.0 KiB
TypeScript

// Type definitions for gulp-zip 4.0
// Project: https://github.com/sindresorhus/gulp-zip
// Definitions by: Louis Orleans <https://github.com/dudeofawesome>
// Robert Bullen <https://github.com/robertbullen>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
declare namespace GulpZip {
interface GulpZipOptions {
/**
* Compress
* @default true
*/
compress?: boolean;
/**
* Overrides the modification timestamp for all files added to the archive.
*
* Tip: Setting it to the same value across executions enables you to create stable archives
* that change only when the contents of their entries change, regardless of whether those
* entries were "touched" or regenerated.
*
* @default undefined
*/
modifiedTime?: Date;
}
}
declare function GulpZip(filename: string, options?: GulpZip.GulpZipOptions): NodeJS.ReadStream;
export = GulpZip;