diff --git a/types/datasource.d.ts b/types/datasource.d.ts index 34228b7a..47673c5e 100644 --- a/types/datasource.d.ts +++ b/types/datasource.d.ts @@ -288,7 +288,10 @@ export declare class DataSource extends EventEmitter { disconnect(callback: Callback): void; // Only promise variant, callback is intentionally not described. - stop(): Promise; + // Note we must use `void | PromiseLike` to avoid breaking + // existing LoopBack 4 applications. + // TODO(semver-major): change the return type to `Promise` + stop(): void | PromiseLike; ping(): Promise; // legacy callback style