1 | # Installation
|
2 | > `npm install --save @types/touch`
|
3 |
|
4 | # Summary
|
5 | This package contains type definitions for touch (https://github.com/isaacs/node-touch).
|
6 |
|
7 | # Details
|
8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/touch.
|
9 | ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/touch/index.d.ts)
|
10 | ````ts
|
11 | /// <reference types="node" />
|
12 |
|
13 | declare function touch<T = void>(filename: string, cb?: (err?: NodeJS.ErrnoException) => T): Promise<T>;
|
14 | declare function touch<T = void>(
|
15 | filename: string,
|
16 | options?: touch.Options,
|
17 | cb?: (err?: NodeJS.ErrnoException) => T,
|
18 | ): Promise<T>;
|
19 |
|
20 | declare namespace touch {
|
21 | interface Options {
|
22 | force?: boolean | undefined;
|
23 | time?: Date | string | number | undefined;
|
24 | atime?: boolean | Date | undefined;
|
25 | mtime?: boolean | Date | undefined;
|
26 | ref?: string | undefined;
|
27 | nocreate?: boolean | undefined;
|
28 | closeAfter?: boolean | undefined;
|
29 | }
|
30 |
|
31 | function sync(filename: string, options?: Options): void;
|
32 |
|
33 | function ftouch<T = void>(fd: number, cb?: (err?: NodeJS.ErrnoException) => T): Promise<T>;
|
34 | function ftouch<T = void>(fd: number, options?: Options, cb?: (err?: NodeJS.ErrnoException) => T): Promise<T>;
|
35 |
|
36 | function ftouchSync(fd: number, options?: Options): void;
|
37 | }
|
38 |
|
39 | export = touch;
|
40 |
|
41 | ````
|
42 |
|
43 | ### Additional Details
|
44 | * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
|
45 | * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
|
46 |
|
47 | # Credits
|
48 | These definitions were written by [Mizunashi Mana](https://github.com/mizunashi-mana), and [BendingBender](https://github.com/BendingBender).
|
49 |
|
\ | No newline at end of file |