Merge pull request #1838 from strongloop/fix/stop-typings

types: make DataSource.stop compatible with LB4
This commit is contained in:
Miroslav Bajtoš 2020-04-28 09:04:02 +02:00 committed by GitHub
commit a25df6ac36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -288,7 +288,10 @@ export declare class DataSource extends EventEmitter {
disconnect(callback: Callback): void; disconnect(callback: Callback): void;
// Only promise variant, callback is intentionally not described. // Only promise variant, callback is intentionally not described.
stop(): Promise<void>; // Note we must use `void | PromiseLike<void>` to avoid breaking
// existing LoopBack 4 applications.
// TODO(semver-major): change the return type to `Promise<void>`
stop(): void | PromiseLike<void>;
ping(): Promise<void>; ping(): Promise<void>;
// legacy callback style // legacy callback style