Skip to content

Commit

Permalink
Preparation for typescript 2.4 (#730)
Browse files Browse the repository at this point in the history
* ComponentLifecycle: interface -> abstract class

* fix typo
  • Loading branch information
kwoon authored and developit committed Jun 19, 2017
1 parent d213b08 commit b03bb36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/preact.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ declare namespace preact {
key:string;
}

interface ComponentLifecycle<PropsType, StateType> {
abstract class ComponentLifecycle<PropsType, StateType> {
componentWillMount?():void;
componentDidMount?():void;
componentWillUnmount?():void;
Expand All @@ -45,7 +45,7 @@ declare namespace preact {
// Type alias for a component considered generally, whether stateless or stateful.
type AnyComponent<PropsType, StateType> = FunctionalComponent<PropsType> | typeof Component;

abstract class Component<PropsType, StateType> implements ComponentLifecycle<PropsType, StateType> {
abstract class Component<PropsType, StateType> extends ComponentLifecycle<PropsType, StateType> {
constructor(props?:PropsType, context?:any);

static displayName?:string;
Expand Down

0 comments on commit b03bb36

Please sign in to comment.