@types/hoist-non-react-statics
TypeScript definitions for hoist-non-react-statics
Last updated 9 months ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/hoist-non-react-statics 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/hoist-non-react-statics

Summary

This package contains type definitions for hoist-non-react-statics (https://github.com/mridgway/hoist-non-react-statics#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hoist-non-react-statics.

index.d.ts

import * as React from "react";

interface REACT_STATICS {
    childContextTypes: true;
    contextType: true;
    contextTypes: true;
    defaultProps: true;
    displayName: true;
    getDefaultProps: true;
    getDerivedStateFromError: true;
    getDerivedStateFromProps: true;
    mixins: true;
    propTypes: true;
    type: true;
}

interface KNOWN_STATICS {
    name: true;
    length: true;
    prototype: true;
    caller: true;
    callee: true;
    arguments: true;
    arity: true;
}

interface MEMO_STATICS {
    "$$typeof": true;
    compare: true;
    defaultProps: true;
    displayName: true;
    propTypes: true;
    type: true;
}

interface FORWARD_REF_STATICS {
    "$$typeof": true;
    render: true;
    defaultProps: true;
    displayName: true;
    propTypes: true;
}

declare namespace hoistNonReactStatics {
    type NonReactStatics<
        Source,
        C extends {
            [key: string]: true;
        } = {},
    > = {
        [
            key in Exclude<
                keyof Source,
                Source extends React.MemoExoticComponent<any> ? keyof MEMO_STATICS | keyof C
                    : Source extends React.ForwardRefExoticComponent<any> ? keyof FORWARD_REF_STATICS | keyof C
                    : keyof REACT_STATICS | keyof KNOWN_STATICS | keyof C
            >
        ]: Source[key];
    };
}

declare function hoistNonReactStatics<
    Target,
    Source,
    CustomStatic extends {
        [key: string]: true;
    } = {},
>(
    TargetComponent: Target,
    SourceComponent: Source,
    customStatic?: CustomStatic,
): Target & hoistNonReactStatics.NonReactStatics<Source, CustomStatic>;

export = hoistNonReactStatics;

Additional Details

Credits

These definitions were written by JounQin, and James Reggio.

Current Tags

  • 3.3.7                                ...           latest (9 months ago)
  • 3.3.1                                ...           ts2.8 (7 years ago)
  • 3.3.1                                ...           ts2.9 (7 years ago)
  • 3.3.1                                ...           ts3.0 (7 years ago)
  • 3.3.1                                ...           ts3.1 (7 years ago)
  • 3.3.1                                ...           ts3.2 (7 years ago)
  • 3.3.1                                ...           ts3.3 (7 years ago)
  • 3.3.1                                ...           ts3.4 (7 years ago)
  • 3.3.1                                ...           ts3.5 (7 years ago)
  • 3.3.1                                ...           ts3.6 (7 years ago)
  • 3.3.1                                ...           ts3.7 (7 years ago)
  • 3.3.1                                ...           ts3.8 (7 years ago)
  • 3.3.1                                ...           ts3.9 (7 years ago)
  • 3.3.1                                ...           ts4.0 (7 years ago)
  • 3.3.1                                ...           ts4.1 (7 years ago)
  • 3.3.1                                ...           ts4.2 (7 years ago)
  • 3.3.1                                ...           ts4.3 (7 years ago)
  • 3.3.1                                ...           ts4.4 (7 years ago)
  • 3.3.5                                ...           ts4.5 (2 years ago)
  • 3.3.5                                ...           ts4.6 (2 years ago)
  • 3.3.5                                ...           ts4.7 (2 years ago)
  • 3.3.5                                ...           ts4.8 (2 years ago)
  • 3.3.5                                ...           ts4.9 (2 years ago)
  • 3.3.6                                ...           ts5.0 (a year ago)
  • 3.3.7                                ...           ts5.1 (9 months ago)
  • 3.3.7                                ...           ts5.2 (9 months ago)
  • 3.3.7                                ...           ts5.3 (9 months ago)
  • 3.3.7                                ...           ts5.4 (9 months ago)
  • 3.3.7                                ...           ts5.5 (9 months ago)
  • 3.3.7                                ...           ts5.6 (9 months ago)
  • 3.3.7                                ...           ts5.7 (9 months ago)
  • 3.3.7                                ...           ts5.8 (9 months ago)
  • 3.3.7                                ...           ts5.9 (9 months ago)
  • 3.3.7                                ...           ts6.0 (9 months ago)

10 Versions

  • 3.3.7                                ...           9 months ago
  • 3.3.6                                ...           a year ago
  • 3.3.5                                ...           2 years ago
  • 3.3.4                                ...           2 years ago
  • 3.3.3                                ...           3 years ago
  • 3.3.2                                ...           3 years ago
  • 3.3.1                                ...           7 years ago
  • 3.3.0                                ...           7 years ago
  • 3.0.1                                ...           8 years ago
  • 3.0.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 1
Last Month 1
Dependencies (1)
Dev Dependencies (0)
None

Copyright 2013 - present © cnpmjs.org | Home |