# @types/hoist-non-react-statics

> TypeScript definitions for hoist-non-react-statics

Latest version **3.3.7** (published 2025-07-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/hoist-non-react-statics
pnpm add @types/hoist-non-react-statics
yarn add @types/hoist-non-react-statics
bun add @types/hoist-non-react-statics
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 3.3.7 |
| Published | 2025-07-21 |
| First published | 2018-07-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/hoist-non-react-statics
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hoist-non-react-statics
- npm.io page: https://npm.io/package/@types/hoist-non-react-statics

## Dependencies (1)

- [hoist-non-react-statics](https://npm.io/package/hoist-non-react-statics.md) ^3.3.0

## Recent versions

- 3.3.7 (latest) — 2025-07-21
- 3.3.6 (ts5.0) — 2024-12-05
- 3.3.5 (ts4.8) — 2023-11-07
- 3.3.1 (ts2.8) — 2019-04-04
- 3.3.4 — 2023-10-18
- 3.3.3 — 2023-10-10
- 3.3.2 — 2023-09-16
- 3.3.0 — 2019-03-05
- 3.0.1 — 2018-08-02
- 3.0.0 — 2018-07-30

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hoist-non-react-statics/index.d.ts)
````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](https://npmjs.com/package/hoist-non-react-statics)
 * Peer dependencies: [@types/react](https://npmjs.com/package/@types/react)

# Credits
These definitions were written by [JounQin](https://github.com/JounQin), and [James Reggio](https://github.com/jamesreggio).

---
_Source: https://npm.io/package/@types/hoist-non-react-statics · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
