# @types/touch

> TypeScript definitions for touch

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

## Install

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

## 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.

Negative: abandoned.

## Facts

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

## Links

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

## Dependencies (1)

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

## Recent versions

- 3.1.5 (latest) — 2023-11-07
- 3.1.3 (ts4.3) — 2023-09-12
- 3.1.2 (ts3.6) — 2021-07-02
- 3.1.1 (ts2.3) — 2018-10-10
- 0.0.1 (ts2.0) — 2016-10-05
- 3.1.4 — 2023-10-18
- 3.1.0 — 2017-07-24

## README

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

declare function touch<T = void>(filename: string, cb?: (err?: NodeJS.ErrnoException) => T): Promise<T>;
declare function touch<T = void>(
    filename: string,
    options?: touch.Options,
    cb?: (err?: NodeJS.ErrnoException) => T,
): Promise<T>;

declare namespace touch {
    interface Options {
        force?: boolean | undefined;
        time?: Date | string | number | undefined;
        atime?: boolean | Date | undefined;
        mtime?: boolean | Date | undefined;
        ref?: string | undefined;
        nocreate?: boolean | undefined;
        closeAfter?: boolean | undefined;
    }

    function sync(filename: string, options?: Options): void;

    function ftouch<T = void>(fd: number, cb?: (err?: NodeJS.ErrnoException) => T): Promise<T>;
    function ftouch<T = void>(fd: number, options?: Options, cb?: (err?: NodeJS.ErrnoException) => T): Promise<T>;

    function ftouchSync(fd: number, options?: Options): void;
}

export = touch;

````

### 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 [Mizunashi Mana](https://github.com/mizunashi-mana), and [BendingBender](https://github.com/BendingBender).

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