Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use @types/react-router-dom type definition #1519

Merged
merged 1 commit into from
Nov 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions packages/umi/link.d.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,2 @@
import * as React from 'react';

declare class Link extends React.Component<{
to: string | {
pathname: string,
search?: string,
hash?: string,
state?: any,
},
replace?: boolean,
innerRef?: Function,
title?: string,
id?: string,
className?: string,
}, any> {
render(): JSX.Element;
}
import { Link } from 'react-router-dom';
export default Link;
24 changes: 1 addition & 23 deletions packages/umi/navlink.d.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,2 @@
import * as React from 'react';

declare class NavLink extends React.Component<{
to: string | {
pathname: string,
search: string,
hash: string,
state: any,
},
replace?: boolean,
innerRef?: Function,
title?: string,
id?: string,
className?: string,
activeClassName?: string,
activeStyle?: object,
exact?: boolean,
strict?: boolean,
isActive?: Function,
location?: object,
}, any> {
render(): JSX.Element;
}
import { NavLink } from 'react-router-dom';
export default NavLink;
1 change: 1 addition & 0 deletions packages/umi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"@babel/core": "^7.0.0",
"@babel/runtime": "^7.0.0",
"@types/react": "^16.4.9",
"@types/react-router-dom": "4.x",
"babel-preset-umi": "^1.2.1",
"debug": "^3.1.0",
"dotenv": "^6.0.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/umi/prompt.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { Prompt } from 'react-router-dom';
export default Prompt;
17 changes: 1 addition & 16 deletions packages/umi/redirect.d.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,2 @@
import * as React from 'react';

declare class Redirect extends React.Component<{
to: string | {
pathname: string,
search: string,
hash: string,
state: any,
},
push?: boolean,
from?: string,
exact?: boolean,
strict?: boolean,
}, any> {
render(): JSX.Element;
}
import { Redirect } from 'react-router-dom';
export default Redirect;
2 changes: 1 addition & 1 deletion packages/umi/withRouter.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
declare const withRouter: (component:Function) => Function;
import { withRouter } from 'react-router-dom';
export default withRouter;