Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/react-codemirror

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/react-codemirror - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

11

react-codemirror/index.d.ts

@@ -14,3 +14,2 @@ // Type definitions for React Codemirror v1.0.0

children?: React.ReactNode;
ref?: React.LegacyRef<ReactCodeMirror> | undefined;
/** Automatically focuses the editor when it is mounted (default false) */

@@ -45,4 +44,6 @@ autoFocus?: boolean | undefined;

}
}
interface ReactCodeMirror extends React.Component<ReactCodeMirrorProps> {
declare module "react-codemirror" {
class RCM extends React.Component<ReactCodeMirror.ReactCodeMirrorProps> {
/** Focuses the CodeMirror instance. */

@@ -54,9 +55,3 @@ focus(): void;

}
interface ReactCodeMirrorClass extends React.ComponentClass<ReactCodeMirrorProps> { }
}
declare module "react-codemirror" {
const RCM: ReactCodeMirror.ReactCodeMirrorClass;
export = RCM;
}
{
"name": "@types/react-codemirror",
"version": "1.0.6",
"version": "1.0.7",
"description": "TypeScript definitions for React Codemirror",

@@ -31,4 +31,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-codemirror",

},
"typesPublisherContentHash": "f4a99bcc690a66582ab38584b4d31e7fbaefb97292f9f947d561a9c5b63c3954",
"typeScriptVersion": "3.8"
"typesPublisherContentHash": "08ee2989ffc473c0b44ef9bf8a0fffbe75506d9f484d9d9ccc3923a3bbc6ce8a",
"typeScriptVersion": "3.9"
}

@@ -9,5 +9,63 @@ # Installation

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-codemirror.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-codemirror/index.d.ts)
````ts
// Type definitions for React Codemirror v1.0.0
// Project: https://github.com/JedWatson/react-codemirror
// Definitions by: Vicky Lai <https://github.com/velveret>
// Rudi Chen <https://github.com/rudi-c>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.8
/// <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;
}
````
### Additional Details
* Last updated: Thu, 21 Oct 2021 23:01:37 GMT
* Last updated: Sat, 12 Mar 2022 13:01:43 GMT
* Dependencies: [@types/react](https://npmjs.com/package/@types/react), [@types/codemirror](https://npmjs.com/package/@types/codemirror)

@@ -14,0 +72,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc