Fix typescript typing for DataSource.getModel
See https://github.com/strongloop/loopback-next/pull/3722
This commit is contained in:
parent
ad1777fcd3
commit
1e8b8a041b
|
@ -108,7 +108,15 @@ export declare class DataSource extends EventEmitter {
|
||||||
options?: Options,
|
options?: Options,
|
||||||
): T;
|
): T;
|
||||||
|
|
||||||
getModel(modelName: string): ModelBaseClass | undefined;
|
/**
|
||||||
|
* Look up a model class by name
|
||||||
|
* @param modelName Model name
|
||||||
|
* @param forceCreate A flag to force creation of a model if not found
|
||||||
|
*/
|
||||||
|
getModel(
|
||||||
|
modelName: string,
|
||||||
|
forceCreate?: boolean,
|
||||||
|
): ModelBaseClass | undefined;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove a model from the registry.
|
* Remove a model from the registry.
|
||||||
|
@ -197,17 +205,15 @@ export declare class DataSource extends EventEmitter {
|
||||||
execute(
|
execute(
|
||||||
command: string | object,
|
command: string | object,
|
||||||
args?: any[] | object,
|
args?: any[] | object,
|
||||||
options?: Options
|
options?: Options,
|
||||||
): Promise<any>;
|
): Promise<any>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Begin a new transaction.
|
* Begin a new transaction.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @param [options] Options {isolationLevel: '...', timeout: 1000}
|
* @param [options] Options {isolationLevel: '...', timeout: 1000}
|
||||||
* @returns Promise A promise which resolves to a Transaction object
|
* @returns Promise A promise which resolves to a Transaction object
|
||||||
*/
|
*/
|
||||||
beginTransaction(
|
beginTransaction(options?: IsolationLevel | Options): Promise<Transaction>;
|
||||||
options?: IsolationLevel | Options,
|
|
||||||
): Promise<Transaction>;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue