Files
DefinitelyTyped/types/move-concurrently/move-concurrently-tests.ts
Melvin Groenhoff 65f34f72c6 Add typings for move-concurrently. (#18813)
* Add typings for move-concurrently.

* Get Promise type from options if passed.
2017-08-11 08:41:16 -07:00

21 lines
444 B
TypeScript

import * as move from 'move-concurrently';
move('/path/to/thing', '/new/path/thing').then(() => {
// thing is now moved!
}).catch((err: any) => {
// oh no!
});
import * as Bluebird from 'bluebird';
const promise = move('/path/to/thing', '/new/path/thing', { Promise: Bluebird })
.then(() => {
// thing is now moved!
})
.error((err: any) => {
// this is a Bluebird promise!
})
.catch((err: any) => {
// oh no!
});