mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
Replaced self-implemented definition for history with actual definition
This commit is contained in:
Vendored
+1
-17
@@ -11,6 +11,7 @@ import {
|
||||
Middleware,
|
||||
GenericStoreEnhancer
|
||||
} from 'redux';
|
||||
import { History } from 'history';
|
||||
|
||||
export type Nullable<T> = T | null | undefined;
|
||||
|
||||
@@ -104,23 +105,6 @@ export type HistoryAction = string;
|
||||
|
||||
export type Listener = (location: HistoryLocation, action: HistoryAction) => void;
|
||||
|
||||
export interface History {
|
||||
listen(listener: Listener): void;
|
||||
push(pathname: string): void;
|
||||
replace(pathname: string): void;
|
||||
goBack(): void;
|
||||
goForward(): void;
|
||||
go(n: number): void;
|
||||
canGo(n: number): boolean;
|
||||
|
||||
entries: Array<{ pathname: string }>;
|
||||
index: number;
|
||||
length: number;
|
||||
location: {
|
||||
pathname: string;
|
||||
};
|
||||
}
|
||||
|
||||
export type ScrollBehavior = object;
|
||||
|
||||
export interface Router {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"redux": "^3.7.0"
|
||||
"redux": "^3.7.0",
|
||||
"history": "^4.6.2"
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { connectRoutes, History, LocationState, RoutesMap } from 'redux-first-router';
|
||||
import { connectRoutes, LocationState, RoutesMap } from 'redux-first-router';
|
||||
import {
|
||||
createStore,
|
||||
applyMiddleware,
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
GenericStoreEnhancer,
|
||||
StoreEnhancerStoreCreator
|
||||
} from 'redux';
|
||||
import { History } from 'history';
|
||||
|
||||
declare var console: any;
|
||||
declare var history: History;
|
||||
|
||||
Reference in New Issue
Block a user