🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

@types/hoist-non-react-statics

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/hoist-non-react-statics

TypeScript definitions for hoist-non-react-statics

ts5.1
ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
ts6.0
latest
Source
npmnpm
Version
3.3.7
Version published
Weekly downloads
13M
-4.76%
Maintainers
1
Weekly downloads
 
Created
Source

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

  • Last updated: Mon, 21 Jul 2025 13:15:00 GMT
  • Dependencies: hoist-non-react-statics
  • Peer dependencies: @types/react

Credits

These definitions were written by JounQin, and James Reggio.

FAQs

Package last updated on 21 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts