DefinitelyTyped/types/promised-temp/index.d.ts
Nathan Shively-Sanders 708214ef04 Change 'export default' to 'export =', part 2 (#33823)
* Change 'export default' to 'export ='

For packages that don't actually export a 'default' property.

* 7 more packages
2019-03-12 16:36:10 -07:00

31 lines
1.0 KiB
TypeScript

// Type definitions for promised-temp 0.1
// Project: https://www.npmjs.com/package/promised-temp, https://github.com/mikaturunen/promised-temp
// Definitions by: Saqib Rokadia <https://github.com/rokadias>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
import * as fs from 'fs';
import { AffixOptions, AffixOptions as _A,
OpenFile, OpenFile as _O,
Stats, Stats as _S } from "temp";
interface TempStatic {
dir: string;
track(value?: boolean): TempStatic;
path(affixes?: string | AffixOptions, defaultPrefix?: string): string;
mkdir(affixes?: string | AffixOptions): Promise<string>;
open(affixes?: string | AffixOptions): Promise<OpenFile>;
cleanup(): Promise<boolean | Stats>;
createWriteStream(affixes?: string | AffixOptions): Promise<fs.WriteStream>;
}
declare namespace PromisedTemp {
type AffixOptions = _A;
type OpenFile = _O;
type Stats = _S;
}
declare var PromisedTemp: TempStatic;
export = PromisedTemp;