Files
docx-js/ts/typings/archiver/archiver.d.ts

43 lines
1.2 KiB
TypeScript
Raw Normal View History

2016-03-31 15:49:42 +01:00
// Type definitions for archiver v0.15.0
// Project: https://github.com/archiverjs/node-archiver
// Definitions by: Esri <https://github.com/archiverjs/node-archiver>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/* =================== USAGE ===================
import Archiver = require('archiver);
var archiver = Archiver.create('zip');
archiver.pipe(FS.createWriteStream('xxx'));
archiver.append(FS.createReadStream('xxx'));
archiver.finalize();
=============================================== */
/// <reference path="../node/node.d.ts" />
declare module "archiver" {
import * as FS from 'fs';
import * as STREAM from 'stream';
interface nameInterface {
name?: string;
}
2016-03-31 18:07:22 +01:00
interface Archiver extends STREAM.Transform {
2016-03-31 15:49:42 +01:00
pipe(writeStream: FS.WriteStream): void;
append(readStream: FS.ReadStream, name: nameInterface): void;
finalize(): void;
}
interface Options {
}
2016-03-31 18:07:22 +01:00
function archiver(format: string, options?: Options): Archiver;
2016-03-31 15:49:42 +01:00
2016-03-31 18:07:22 +01:00
namespace archiver {
function create(format: string, options?: Options): Archiver;
2016-03-31 15:49:42 +01:00
}
2016-03-31 18:07:22 +01:00
export = archiver;
2016-03-31 15:49:42 +01:00
}