mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Change 'export default' to 'export =' For packages that don't actually export a 'default' property. * 7 more packages
31 lines
1.0 KiB
TypeScript
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;
|