# @types/temp

> TypeScript definitions for temp

Latest version **0.9.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/temp
pnpm add @types/temp
yarn add @types/temp
bun add @types/temp
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.9.4 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51432 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/temp
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/temp
- npm.io page: https://npm.io/package/@types/temp

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 0.9.4 (latest) — 2023-11-07
- 0.9.2 (ts4.3) — 2023-09-12
- 0.9.1 (ts3.6) — 2021-07-02
- 0.9.0 (ts3.5) — 2021-04-05
- 0.8.34 (ts2.0) — 2019-04-26
- 0.9.3 — 2023-10-18
- 0.8.33 — 2019-02-14
- 0.8.32 — 2018-04-21
- 0.8.31 — 2017-10-25
- 0.8.30 — 2017-10-09
- 0.8.29 — 2016-10-06
- 0.8.28 — 2016-09-19
- 0.8.27 — 2016-07-14
- 0.8.26-alpha — 2016-07-08
- 0.8.25-alpha — 2016-07-04
- … 7 more at https://npm.io/package/@types/temp/versions

## README

# Installation
> `npm install --save @types/temp`

# Summary
This package contains type definitions for temp (https://github.com/bruce/node-temp).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/temp.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/temp/index.d.ts)
````ts
/// <reference types="node" />

import * as fs from "fs";

declare namespace temp {
    interface OpenFile {
        path: string;
        fd: number;
    }

    interface Stats {
        files: number;
        dirs: number;
    }

    interface AffixOptions {
        prefix?: string | undefined;
        suffix?: string | undefined;
        dir?: string | undefined;
    }

    let dir: string;

    function track(value?: boolean): typeof temp;

    function mkdir(affixes: string | AffixOptions | undefined, callback: (err: any, dirPath: string) => void): void;
    function mkdir(affixes?: string | AffixOptions): Promise<string>;

    function mkdirSync(affixes?: string | AffixOptions): string;

    function open(affixes: string | AffixOptions | undefined, callback: (err: any, result: OpenFile) => void): void;
    function open(affixes?: string | AffixOptions): Promise<OpenFile>;

    function openSync(affixes?: string | AffixOptions): OpenFile;

    function path(affixes?: string | AffixOptions, defaultPrefix?: string): string;

    function cleanup(callback: (err: any, result: Stats) => void): void;
    function cleanup(): Promise<Stats>;

    function cleanupSync(): boolean | Stats;

    function createWriteStream(affixes?: string | AffixOptions): fs.WriteStream;
}

export = temp;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Daniel Rosenwasser](https://github.com/DanielRosenwasser).

---
_Source: https://npm.io/package/@types/temp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
