From 6002206a0decd5f949371ebcfb66970e9b0f9a53 Mon Sep 17 00:00:00 2001 From: Dmitry Jakubovsky Date: Tue, 13 Jun 2017 13:05:52 +0300 Subject: [PATCH 1/2] ComponentLifecycle: interface -> abstract class --- src/preact.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/preact.d.ts b/src/preact.d.ts index 84f37fcad3..35577f921e 100644 --- a/src/preact.d.ts +++ b/src/preact.d.ts @@ -22,7 +22,7 @@ declare namespace preact { key:string; } - interface ComponentLifecycle { + abstract class ComponentLifecycle { componentWillMount?():void; componentDidMount?():void; componentWillUnmount?():void; @@ -45,7 +45,7 @@ declare namespace preact { // Type alias for a component considered generally, whether stateless or stateful. type AnyComponent = FunctionalComponent | typeof Component; - abstract class Component implements ComponentLifecycle { + abstract class Component extends ComponenLifecycle { constructor(props?:PropsType, context?:any); static displayName?:string; From bb496c8876c3d6d08d9ab11bc2a30d17e56a4e8a Mon Sep 17 00:00:00 2001 From: Dmitry Jakubovsky Date: Tue, 13 Jun 2017 13:22:34 +0300 Subject: [PATCH 2/2] fix typo --- src/preact.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/preact.d.ts b/src/preact.d.ts index 35577f921e..ef3c122dc9 100644 --- a/src/preact.d.ts +++ b/src/preact.d.ts @@ -45,7 +45,7 @@ declare namespace preact { // Type alias for a component considered generally, whether stateless or stateful. type AnyComponent = FunctionalComponent | typeof Component; - abstract class Component extends ComponenLifecycle { + abstract class Component extends ComponentLifecycle { constructor(props?:PropsType, context?:any); static displayName?:string;