npm.io
2.0.5 • Published 2 years ago

@types/react-lifecycle-component

Licence
MIT
Version
2.0.5
Deps
3
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/react-lifecycle-component

Summary

This package contains type definitions for react-lifecycle-component (https://github.com/JamieDixon/react-lifecycle-component).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-lifecycle-component.

index.d.ts

import { Component, ComponentClass, ComponentLifecycle } from "react";
import { Connect } from "react-redux";

export interface LifecycleStateProps<P = {}, S = {}> {
    component: ComponentClass<P, S>;
}

export interface LifecycleDispatchProps<P = {}, S = {}> extends ComponentLifecycle<P, S> {}

export interface Props<P = {}, S = {}> extends LifecycleStateProps<P, S>, LifecycleDispatchProps<P, S> {}

export class LifecycleComponent extends Component<Props<any, any>, any> {}

export function applyLifecycle<P = {}, S = {}>(
    component: ComponentClass<P, S>,
): ComponentClass<P & LifecycleDispatchProps<P, S>>;

export const connectWithLifecycle: Connect;

Additional Details

Credits

These definitions were written by Alexander Fisher.