Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
@types/hoist-non-react-statics
Advanced tools
The @types/hoist-non-react-statics package provides TypeScript type definitions for the hoist-non-react-statics package. This is useful for TypeScript projects that use hoist-non-react-statics to copy non-react specific statics from a child component to a parent component. It helps in maintaining type safety and IntelliSense in IDEs for projects that hoist statics in React components.
Type Definitions for Hoisting Statics
This code demonstrates how to use @types/hoist-non-react-statics for adding TypeScript type definitions when hoisting non-react statics from a base component to a wrapped component. It ensures that the static methods and properties are correctly typed and recognized by TypeScript.
import hoistNonReactStatics from 'hoist-non-react-statics';
import React from 'react';
class BaseComponent extends React.Component {}
class WrappedComponent extends React.Component {}
hoistNonReactStatics(WrappedComponent, BaseComponent);
This is the JavaScript library that @types/hoist-non-react-statics provides types for. It copies non-react specific statics from a child component to a parent component. While it performs the actual functionality, @types/hoist-non-react-statics only provides type definitions and does not implement any functionality.
npm install --save @types/hoist-non-react-statics
This package contains type definitions for hoist-non-react-statics (https://github.com/mridgway/hoist-non-react-statics#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hoist-non-react-statics
Additional Details
These definitions were written by JounQin https://github.com/JounQin.
FAQs
TypeScript definitions for hoist-non-react-statics
The npm package @types/hoist-non-react-statics receives a total of 0 weekly downloads. As such, @types/hoist-non-react-statics popularity was classified as not popular.
We found that @types/hoist-non-react-statics demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.