Skip to content

Commit

Permalink
packages/router: fix TS ERROR when use <Route/> (#1355)
Browse files Browse the repository at this point in the history
an TS ERROR would be thrown when using <Route component={Compo}/>.
Component defaultProps should have same type as ComponentType and ComponentClass.
  • Loading branch information
rocka authored and Havunen committed Jun 26, 2018
1 parent 4e2209b commit e649417
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/inferno/src/core/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export interface ComponentLifecycle<P, S> {
export interface Component<P = {}, S = {}> extends ComponentLifecycle<P, S> {}
export class Component<P, S> {
// Public
public static defaultProps: {} | null = null;
public static defaultProps?: Partial<any>;
public state: S | null = null;
public props: Props<P, this> & P;
public context: any;
Expand Down

0 comments on commit e649417

Please sign in to comment.