2.0.8 • Published 6 months ago

@types/ncp v2.0.8

Weekly downloads
43,389
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/ncp

Summary

This package contains type definitions for ncp (https://github.com/AvianFlu/ncp).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ncp.

index.d.ts

// Type definitions for ncp 2.0
// Project: https://github.com/AvianFlu/ncp
// Definitions by: Bart van der Schoor <https://github.com/bartvds>
//                 Benoit Lemaire <https://github.com/belemaire>
//                 ExE Boss <https://github.com/ExE-Boss>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node" />
import * as fs from 'fs';

declare namespace ncp {
    interface File {
        name: string;
        mode: number;

        /** Accessed time */
        atime: Date;

        /** Modified time */
        mtime: Date;
    }

    interface Options {
        filter?: RegExp | ((filename: string) => boolean) | undefined;
        transform?: ((read: NodeJS.ReadableStream, write: NodeJS.WritableStream, file: File) => void) | undefined;
        clobber?: boolean | undefined;
        dereference?: boolean | undefined;
        stopOnErr?: boolean | undefined;
        errs?: fs.PathLike | undefined;
        limit?: number | undefined;
    }
}

declare const ncp: {
    (source: string, destination: string, callback: (err: Error[] | null) => void): void;
    (
        source: string,
        destination: string,
        options: ncp.Options & { stopOnErr: true },
        callback: (err: Error | null) => void,
    ): void;
    (
        source: string,
        destination: string,
        options: ncp.Options & { errs?: undefined },
        callback: (err: Error[] | null) => void,
    ): void;
    (
        source: string,
        destination: string,
        options: ncp.Options & { errs: fs.PathLike },
        callback: (err: fs.WriteStream | null) => void,
    ): void;
    (
        source: string,
        destination: string,
        options: ncp.Options,
        callback: (err: Error | Error[] | fs.WriteStream | null) => void,
    ): void;

    ncp: typeof ncp;

    /**
     * **NOTE:** This function provides design-time support for util.promisify.
     *
     * It does not exist at runtime.
     */
    __promisify__(source: string, destination: string, options?: ncp.Options): Promise<void>;
};

export = ncp;

Additional Details

  • Last updated: Wed, 07 Jul 2021 00:01:46 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Bart van der Schoor, Benoit Lemaire, and ExE Boss.

2.0.7

6 months ago

2.0.6

7 months ago

2.0.8

6 months ago

2.0.5

3 years ago

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

5 years ago

2.0.1

7 years ago

2.0.0

7 years ago

0.5.29

8 years ago

0.5.28

8 years ago

0.5.27-alpha

8 years ago

0.5.26-alpha

8 years ago

0.5.25-alpha

8 years ago

0.5.24-alpha

8 years ago

0.5.23-alpha

8 years ago

0.5.22-alpha

8 years ago

0.5.21-alpha

8 years ago

0.5.16-alpha

8 years ago

0.5.15-alpha

8 years ago