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

1.5.5 • Public • Published

Installation

npm install --save @types/cpx

Summary

This package contains type definitions for cpx (https://github.com/mysticatea/cpx).

Details

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

index.d.ts

/// <reference types="node" />

import { EventEmitter } from "events";
import * as stream from "stream";

export interface SyncOptions {
    /** remove files that copied on past before copy. */
    clean?: boolean | undefined;
    /** Follow symbolic links when copying from them. */
    dereference?: boolean | undefined;
    /** Copy empty directories which is matched with the glob. */
    includeEmptyDirs?: boolean | undefined;
    /** Preserve UID, GID, ATIME, and MTIME of files. */
    preserve?: boolean | undefined;
    /** Do not overwrite files on destination if the source file is older. */
    update?: boolean | undefined;
}

export interface AsyncOptions extends SyncOptions {
    /** Function that creates a `stream.Transform` object to transform each copying file. */
    transform?(filepath: string): stream.Transform[];
}

export interface WatchOptions extends AsyncOptions, SyncOptions {
    /** Flag to not copy at the initial time of watch. */
    initialCopy?: boolean | undefined;
}

export class Watcher extends EventEmitter {
    constructor(options: WatchOptions);
    open(): void;
    close(): void;
}

export function copy(
    source: string,
    dest: string,
    options?: AsyncOptions,
    callback?: (error: Error | null) => void,
): void;
export function copy(source: string, dest: string, callback?: (error: Error | null) => void): void;

export function copySync(source: string, dest: string, options?: SyncOptions): void;

export function watch(source: string, dest: string, options?: WatchOptions): Watcher;

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Alan Agius.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/cpx

Weekly Downloads

11,401

Version

1.5.5

License

MIT

Unpacked Size

5.66 kB

Total Files

5

Last publish

Collaborators

  • types