Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@types/create-react-class
Advanced tools
TypeScript definitions for create-react-class
npm install --save @types/create-react-class
This package contains type definitions for create-react-class (https://facebook.github.io/react/).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/create-react-class.
import { Component, ComponentClass, ComponentLifecycle, ReactNode } from "react";
declare namespace createReactClass {
interface Mixin<P, S> extends ComponentLifecycle<P, S> {
mixins?: Array<Mixin<P, S>> | undefined;
statics?: {
[key: string]: any;
} | undefined;
displayName?: string | undefined;
/**
* Ignored by React.
* @deprecated Only kept in types for backwards compatibility. Will be removed in a futre major release.
*/
propTypes?: any;
getDefaultProps?(): P;
getInitialState?(): S;
}
interface ComponentSpec<P, S> extends Mixin<P, S> {
render(): ReactNode;
[propertyName: string]: any;
}
interface ClassicComponent<P = {}, S = {}> extends Component<P, S> {
replaceState(nextState: S, callback?: () => void): void;
isMounted(): boolean;
getInitialState?(): S;
}
interface ClassicComponentClass<P = {}> extends Omit<ComponentClass<P>, "new"> {
new(props: P, context?: any): ClassicComponent<P, any>;
getDefaultProps?(): P;
}
}
declare function createReactClass<P, S = {}>(
spec: createReactClass.ComponentSpec<P, S>,
): createReactClass.ClassicComponentClass<P>;
export as namespace createReactClass;
export = createReactClass;
These definitions were written by John Gozde.
FAQs
TypeScript definitions for create-react-class
The npm package @types/create-react-class receives a total of 57,897 weekly downloads. As such, @types/create-react-class popularity was classified as popular.
We found that @types/create-react-class 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.