Fix initializeAdapterInstance return type

As mentioned in its comments section, initializeAdapterInstance function
should actually return an instance of an adapter. Currently it returns
void.

. Adapter interface was defined, with getRoutePrefix function
. initializeAdapterInstance return type was changed from "void" to
"Adapter"
This commit is contained in:
coni2k
2016-07-28 19:43:37 +03:00
parent 19b6e80e68
commit 9a2c12b7df

6
breeze/breeze.d.ts vendored
View File

@@ -1043,6 +1043,10 @@ declare namespace breeze.config {
@return {an instance of the specified adapter}
**/
export function getAdapterInstance(interfaceName: string, adapterName?: string): Object;
export interface Adapter {
getRoutePrefix: Function
}
/**
Initializes a single adapter implementation. Initialization means either newing a instance of the
specified interface and then calling "initialize" on it or simply calling "initialize" on the instance
@@ -1052,7 +1056,7 @@ declare namespace breeze.config {
@param isDefault=true {Boolean} - Whether to make this the default "adapter" for this interface.
@return {an instance of the specified adapter}
**/
export function initializeAdapterInstance(interfaceName: string, adapterName: string, isDefault?: boolean): void;
export function initializeAdapterInstance(interfaceName: string, adapterName: string, isDefault?: boolean): Adapter;
export interface AdapterInstancesConfig {
/** the name of a previously registered "ajax" adapter */