@types/touch
TypeScript icon, indicating that this package has built-in type declarations

3.1.5 • Public • Published

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

/// <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

Credits

These definitions were written by Mizunashi Mana, and BendingBender.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/touch

Weekly Downloads

11,925

Version

3.1.5

License

MIT

Unpacked Size

4.79 kB

Total Files

5

Last publish

Collaborators

  • types