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.
import { EventEmitter } from "events";
import * as stream from "stream";
export interface SyncOptions {
clean?: boolean | undefined;
dereference?: boolean | undefined;
includeEmptyDirs?: boolean | undefined;
preserve?: boolean | undefined;
update?: boolean | undefined;
}
export interface AsyncOptions extends SyncOptions {
transform?(filepath: string): stream.Transform[];
}
export interface WatchOptions extends AsyncOptions, SyncOptions {
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, 04 Sep 2023 15:41:18 GMT
- Dependencies: @types/node
- Global values: none
Credits
These definitions were written by Alan Agius.