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/react-codemirror
Advanced tools
TypeScript definitions for react-codemirror
npm install --save @types/react-codemirror
This package contains type definitions for react-codemirror (https://github.com/JedWatson/react-codemirror).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-codemirror.
/// <reference types="react"/>
/// <reference types="codemirror"/>
declare namespace ReactCodeMirror {
interface ReactCodeMirrorProps {
children?: React.ReactNode;
/** Automatically focuses the editor when it is mounted (default false) */
autoFocus?: boolean | undefined;
/** Automatically persist changes to underlying textarea (default false) */
autoSave?: boolean | undefined;
/** Adds a custom CSS class to the editor */
className?: string | undefined;
/** Provides a specific CodeMirror instance (defaults to `require('codemirror')`) */
codeMirrorInstance?: ((host: any, options?: CodeMirror.EditorConfiguration) => CodeMirror.Editor) | undefined;
/** Provides the default (not changed tracked) value to the editor */
defaultValue?: string | undefined;
/** Set the name of the editor input field */
name?: string | undefined;
/** Called when a change is made */
onChange?: ((newValue: string, change: CodeMirror.EditorChange) => any) | undefined;
/** Called when the cursor is moved */
onCursorActivity?: ((codemirror: CodeMirror.Editor) => any) | undefined;
/** Called when the editor is focused or loses focus */
onFocusChange?: ((focused: boolean) => any) | undefined;
/** Called when the editor is scrolled */
onScroll?: ((scrollInfo: CodeMirror.ScrollInfo) => any) | undefined;
/** Options passed to the CodeMirror instance */
options?: CodeMirror.EditorConfiguration | undefined;
/** (DEPRECATED), use `name` */
path?: string | undefined;
/** Preserve previous scroll position after updating value */
preserveScrollPosition?: boolean | undefined;
/** The editor value */
value?: string | undefined;
}
}
declare module "react-codemirror" {
class RCM extends React.Component<ReactCodeMirror.ReactCodeMirrorProps> {
/** Focuses the CodeMirror instance. */
focus(): void;
/** Returns the CodeMirror instance, if available. */
getCodeMirror(): CodeMirror.Editor;
}
export = RCM;
}
FAQs
TypeScript definitions for react-codemirror
We found that @types/react-codemirror demonstrated a not healthy version release cadence and project activity because the last version was released 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.