From 6543a55f8ff30f5008bd6fc4f59314a06f2bf07e Mon Sep 17 00:00:00 2001 From: vcastro Date: Mon, 24 Jun 2013 10:03:45 +0100 Subject: [PATCH 1/2] Updates to breeze.d.ts according to changes in Breeze 1.3.6: -Added setDetached method to EntityAspect -Changed the signature of EntityManager.importEntities to accept either a string or a JSON object. --- breeze/breeze.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/breeze/breeze.d.ts b/breeze/breeze.d.ts index cc9feb848..1522d1cd4 100644 --- a/breeze/breeze.d.ts +++ b/breeze/breeze.d.ts @@ -261,6 +261,7 @@ declare module breeze { setDeleted(): void; setModified(): void; setUnchanged(): void; + setDetached(): boolean; validateEntity(): boolean; validateProperty(property: string, context?: any): boolean; @@ -355,7 +356,7 @@ declare module breeze { hasChanges(entityTypes: EntityType[]): boolean; static importEntities(exportedString: string, config?: { mergeStrategy?: MergeStrategySymbol; }): EntityManager; - importEntities(exportedString: string, config?: { mergeStrategy?: MergeStrategySymbol; }): EntityManager; + importEntities(exportedString: any, config?: { mergeStrategy?: MergeStrategySymbol; }): EntityManager; rejectChanges(): Entity[]; saveChanges(entities?: Entity[], saveOptions?: SaveOptions, callback?: SaveChangesSuccessCallback, errorCallback?: SaveChangesErrorCallback): Promise; From 54d7df39e7313d12c5299b6fe557417c5a514c2a Mon Sep 17 00:00:00 2001 From: vcastro Date: Mon, 24 Jun 2013 15:16:16 +0100 Subject: [PATCH 2/2] Updated the durandal router plugin: - Added definition for the guardRoute 'abstract' router function. --- durandal/durandal.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/durandal/durandal.d.ts b/durandal/durandal.d.ts index 1122cbbad..5f98beac1 100644 --- a/durandal/durandal.d.ts +++ b/durandal/durandal.d.ts @@ -480,6 +480,10 @@ declare module "durandal/plugins/router" { * After you've configured the router, you need to activate it. This is usually done in your shell. The activate function of the router returns a promise that resolves when the router is ready to start. To use the router, you should add an activate function to your shell and return the result from that. The application startup infrastructure of Durandal will detect your shell's activate function and call it at the appropriate time, waiting for it's promise to resolve. This allows Durandal to properly orchestrate the timing of composition and databinding along with animations and splash screen display. */ export var activate: (defaultRoute: string) => JQueryPromise; + /** + * Before any route is activated, the guardRoute funtion is called. You can plug into this function to add custom logic to allow, deny or redirect based on the requested route. To allow, return true. To deny, return false. To redirect, return a string with the hash or url. You may also return a promise for any of these values. + */ + export var guardRoute: (routeInfo: IRouteInfo, params: any, instance: any) => any } declare module "durandal/widget" {