Files
DefinitelyTyped/types/move-concurrently/move-concurrently-tests.ts
segayuu df2f503d13 [Bluebird] Cleanup ignore lint error and Enable strintFunctionTypes and noImplicitThis (#20945)
* Cleanup part of lint error "no-unnecessary-generics"

* Cleanup lint error: adjacent-overload-signatures

* Arguments Array to Iterable(Bluebird not support ArrayLike)

* Delete already resolved TODO

* [WIP] cleanup lint-errors: void-return

* cleanup lint error: no-unnecessary-callback-wrapper

* cleanup ignore lint error: no-void-expression

* clean self

* Enable noImplicitThis

* Enable strictFunctionTypes

* Fix error dependent on tsc version(tsc version: 20171024)

* Cleanup lint error: void-return

* Apply https://github.com/DefinitelyTyped/DefinitelyTyped/pull/20945#discussion_r146791411
2017-10-25 11:17:24 -07:00

23 lines
523 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';
// tsc version: 2.7.0-dev.20171024
// required type arguments!
const promise = move<Bluebird<void>>('/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!
});