diff --git a/src/preact.d.ts b/src/preact.d.ts index 84f37fcad3..ef3c122dc9 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 ComponentLifecycle { constructor(props?:PropsType, context?:any); static displayName?:string;