djinn-state-history
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "djinn-state-history", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Djinn-state history integration", | ||
@@ -37,3 +37,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"djinn-state": "^1.2.1", | ||
"djinn-state": "^1.3.0", | ||
"history": "^4.7.2" | ||
@@ -40,0 +40,0 @@ }, |
@@ -25,3 +25,3 @@ import { Action, createMemoryHistory, Location } from 'history'; | ||
expect((<any>service)._history).toBe(history); | ||
expect((service as any)._history).toBe(history); | ||
}); | ||
@@ -57,3 +57,3 @@ | ||
(<any>service).__checkRoute({} as any, {} as any); | ||
(service as any).__checkRoute({} as any, {} as any); | ||
@@ -72,3 +72,3 @@ expect(console.error).toBeCalled(); | ||
(<any>service).__checkRoute({} as any, {} as any); | ||
(service as any).__checkRoute({} as any, {} as any); | ||
@@ -87,3 +87,3 @@ expect(history.goBack).toBeCalled(); | ||
(<any>service).__checkRoute({} as any, {} as any); | ||
(service as any).__checkRoute({} as any, {} as any); | ||
@@ -90,0 +90,0 @@ expect(history.goBack).not.toBeCalled(); |
@@ -11,3 +11,3 @@ import { createMemoryHistory } from 'history'; | ||
expect((<any>service)._history).toBe(history); | ||
expect((service as any)._history).toBe(history); | ||
@@ -91,3 +91,3 @@ const historyState: any[] = service.state.entries; | ||
pathname: '/path', | ||
search: 'ok' | ||
search: 'ok', | ||
}; | ||
@@ -130,3 +130,3 @@ | ||
pathname: '/path', | ||
search: 'ok' | ||
search: 'ok', | ||
}; | ||
@@ -211,3 +211,3 @@ | ||
pathname: '/path', | ||
search: 'ok' | ||
search: 'ok', | ||
}; | ||
@@ -214,0 +214,0 @@ |
import { DjinnService } from 'djinn-state'; | ||
import { Action, History, Location, LocationState, UnregisterCallback } from 'history'; | ||
export class HistoryBlockerService extends DjinnService{ | ||
export class HistoryBlockerService extends DjinnService { | ||
private _history?: History<LocationState>; | ||
@@ -6,0 +6,0 @@ private _unregister?: UnregisterCallback; |
@@ -8,6 +8,6 @@ import { DjinnService } from 'djinn-state'; | ||
TransitionPromptHook, | ||
UnregisterCallback | ||
UnregisterCallback, | ||
} from 'history'; | ||
export class HistoryService extends DjinnService{ | ||
export class HistoryService extends DjinnService { | ||
private _history?: History<LocationState>; | ||
@@ -67,3 +67,3 @@ private _unregister?: UnregisterCallback; | ||
return (<any>this._history)[functionName].apply(this, args); | ||
return (this._history as any)[functionName].apply(this, args); | ||
}; | ||
@@ -70,0 +70,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25068
Updateddjinn-state@^1.3.0