• Version 1.5.5
  • Published
  • 5.66 kB
  • 1 dependency
  • MIT license


npm i @types/cpx
yarn add @types/cpx
pnpm add @types/cpx


TypeScript definitions for cpx



function copy

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

    function copySync

    copySync: (source: string, dest: string, options?: SyncOptions) => void;

      function watch

      watch: (source: string, dest: string, options?: WatchOptions) => Watcher;


        class Watcher

        class Watcher extends EventEmitter {}


          constructor(options: WatchOptions);

            method close

            close: () => void;

              method open

              open: () => void;


                interface AsyncOptions

                interface AsyncOptions extends SyncOptions {}

                  method transform

                  transform: (filepath: string) => stream.Transform[];
                  • Function that creates a stream.Transform object to transform each copying file.

                  interface SyncOptions

                  interface SyncOptions {}

                    property clean

                    clean?: boolean | undefined;
                    • remove files that copied on past before copy.

                    property dereference

                    dereference?: boolean | undefined;
                    • Follow symbolic links when copying from them.

                    property includeEmptyDirs

                    includeEmptyDirs?: boolean | undefined;
                    • Copy empty directories which is matched with the glob.

                    property preserve

                    preserve?: boolean | undefined;
                    • Preserve UID, GID, ATIME, and MTIME of files.

                    property update

                    update?: boolean | undefined;
                    • Do not overwrite files on destination if the source file is older.

                    interface WatchOptions

                    interface WatchOptions extends AsyncOptions, SyncOptions {}

                      property initialCopy

                      initialCopy?: boolean | undefined;
                      • Flag to not copy at the initial time of watch.

                      Package Files (1)

                      Dependencies (1)

                      Dev Dependencies (0)

                      No dev dependencies.

                      Peer Dependencies (0)

                      No peer dependencies.


                      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/cpx.

                      • Markdown
                      • HTML
                        <a href="https://www.jsdocs.io/package/@types/cpx"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>