Socket
Socket
Sign inDemoInstall

@types/ncp

Package Overview
Dependencies
2
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @types/ncp

TypeScript definitions for ncp


Version published
Maintainers
1
Install size
3.82 MB
Created

Readme

Source

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

/// <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: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: @types/node

Credits

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

FAQs

Last updated on 07 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc