Skip to content

Commit b03bb36

Browse files
kwoondevelopit
authored andcommitted
Preparation for typescript 2.4 (preactjs#730)
* ComponentLifecycle: interface -> abstract class * fix typo
1 parent d213b08 commit b03bb36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/preact.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ declare namespace preact {
2222
key:string;
2323
}
2424

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

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

5151
static displayName?:string;

0 commit comments

Comments
 (0)