mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* [bluebird] Rename import to Bluebird for tests * [bluebird] Restore assignability to native Promises * [bluebird] Upgrade TypeScript Versions of all dependents
44 lines
1.8 KiB
TypeScript
44 lines
1.8 KiB
TypeScript
// Type definitions for move-concurrently 1.0
|
|
// Project: https://www.npmjs.com/package/move-concurrently
|
|
// Definitions by: Melvin Groenhoff <https://github.com/mgroenhoff>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 3.2
|
|
|
|
/**
|
|
* Recursively moves from to to and resolves its promise when finished. If to already exists then the promise will be rejected with an EEXIST error.
|
|
*/
|
|
declare function move<T extends PromiseLike<void> = Promise<void>>(from: string, to: string, opts?: move.Options<T>): T;
|
|
|
|
declare namespace move {
|
|
interface Options<T extends PromiseLike<void> = Promise<void>> {
|
|
/**
|
|
* (Default: 1) The maximum number of concurrent copies to do at once.
|
|
*/
|
|
maxConcurrency?: number;
|
|
/**
|
|
* (Default: process.platform === 'win32') If true enables Windows symlink semantics.
|
|
* This requires an extra stat to determine if the destination of a symlink is a file or directory.
|
|
* If symlinking a directory fails then we'll try making a junction instead.
|
|
*/
|
|
isWindows?: boolean;
|
|
/**
|
|
* (Default: global.Promise) The promise implementation to use, defaults to Node's.
|
|
*/
|
|
Promise?: new (...args: any[]) => T;
|
|
/**
|
|
* (Default: require('fs')) The filesystem module to use. Can be used to use graceful-fs or to inject a mock.
|
|
*/
|
|
fs?: any;
|
|
/**
|
|
* (Default: require('fs-write-stream-atomic')) The implementation of writeStreamAtomic to use. Used to inject a mock.
|
|
*/
|
|
writeStreamAtomic?: any;
|
|
/**
|
|
* (Default: process.getuid) A function that returns the current UID. Used to inject a mock.
|
|
*/
|
|
getuid?: any;
|
|
}
|
|
}
|
|
|
|
export = move;
|