From 9a2c12b7dfaf33ff91c50a2484d6bbeef361efb1 Mon Sep 17 00:00:00 2001 From: coni2k Date: Thu, 28 Jul 2016 19:43:37 +0300 Subject: [PATCH 1/2] 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" --- breeze/breeze.d.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/breeze/breeze.d.ts b/breeze/breeze.d.ts index 3fc54dc5d4..6a168cd3ba 100644 --- a/breeze/breeze.d.ts +++ b/breeze/breeze.d.ts @@ -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 */ From fec5296038f58bb601a4576859b645d5374c4dc5 Mon Sep 17 00:00:00 2001 From: Serkan Holat Date: Thu, 28 Jul 2016 20:06:22 +0300 Subject: [PATCH 2/2] Update breeze.d.ts --- breeze/breeze.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/breeze/breeze.d.ts b/breeze/breeze.d.ts index 6a168cd3ba..8cc109d746 100644 --- a/breeze/breeze.d.ts +++ b/breeze/breeze.d.ts @@ -12,6 +12,7 @@ // Updated Jan 20 2015 for Breeze 1.5.2 and merging changes from DefinitelyTyped // Updated Feb 28 2015 add any/all clause on Predicate // Updated Jun 27 2016 - Marcel Good (www.ideablade.com) +// Updated Jul 28 2016 - Serkan "coni2k" Holat declare namespace breeze.core {