mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* [react-router] fixed lint error due to implicit any in CustomLink test
* [react-router] added possibility to specify component props in route definitions, and to specify the type of this.props.route.props when implementing such a component
Example:
/* component definition */
interface Props { foo: string }
class MyComponent extends React.Component<RouteComponentProps<void,void,Props>, State> {
/* here you can use this.props.route.props.foo */
}
/* route configuration */
<Route path="/my-path" component={MyComponent} props={{ foo: 'bar' }}>
* - fixed lint errors related to T[] instead of Array<T>
- added default type for ComponentProps in RouteComponentProps<P,R,ComponentProps>, so that it stays compatible with existing code
* [react-router] added default route props type (any) so that this new feature is fully backward compatible
* [react-router] fixed lint errors (T[] instead of Array<T> for non-generic types)
|
||
|---|---|---|
| .. | ||
| test | ||
| v2 | ||
| v3 | ||
| index.d.ts | ||
| tsconfig.json | ||
| tslint.json | ||