Skip to content

Commit

Permalink
Add type defs for animation hooks (#1609)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhsware committed Oct 3, 2022
1 parent a6cb56f commit 77acc73
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/inferno/src/core/types.ts
Expand Up @@ -39,6 +39,10 @@ export interface IComponent<P, S> {

componentWillUnmount?(): void;

componentDidAppear?(domNode: Element): void;

componentWillDisappear?(domNode: Element, callback: Function): void;

getChildContext?(): void;

getSnapshotBeforeUpdate?(prevProps: Readonly<{ children?: Inferno.InfernoNode } & P>, prevState: S): any;
Expand Down Expand Up @@ -135,6 +139,10 @@ export interface Refs<P> {
onComponentDidUpdate?(lastProps: Readonly<P>, nextProps: Readonly<P>): void;

onComponentWillUnmount?(domNode: Element, nextProps: Readonly<P>): void;

onComponentDidAppear?(domNode: Element): void;

onComponentWillDisappear?(domNode: Element, callback: Function): void;
}

export interface Props<T> {
Expand Down

0 comments on commit 77acc73

Please sign in to comment.