mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
[codemirror] Add Doc#lineSeparator (#45851)
This commit is contained in:
parent
d3facd7b56
commit
607b638249
6
types/codemirror/index.d.ts
vendored
6
types/codemirror/index.d.ts
vendored
@ -460,9 +460,6 @@ declare namespace CodeMirror {
|
||||
/** Tells you whether the editor's content can be edited by the user. */
|
||||
isReadOnly(): boolean;
|
||||
|
||||
/** Returns the preferred line separator string for this document, as per the option by the same name. When that option is null, the string "\n" is returned. */
|
||||
lineSeparator(): string;
|
||||
|
||||
/** Switches between overwrite and normal insert mode (when not given an argument),
|
||||
or sets the overwrite mode to a specific state (when given an argument). */
|
||||
toggleOverwrite(value?: boolean): void;
|
||||
@ -890,6 +887,9 @@ declare namespace CodeMirror {
|
||||
rather than the resolved, instantiated mode object. */
|
||||
getMode(): any;
|
||||
|
||||
/** Returns the preferred line separator string for this document, as per the option by the same name. When that option is null, the string "\n" is returned. */
|
||||
lineSeparator(): string;
|
||||
|
||||
/** Calculates and returns a { line , ch } object for a zero-based index whose value is relative to the start of the editor's text.
|
||||
If the index is out of range of the text then the returned object is clipped to start or end of the text respectively. */
|
||||
posFromIndex(index: number): CodeMirror.Position;
|
||||
|
||||
@ -41,6 +41,7 @@ const myCodeMirror3: CodeMirror.Editor = CodeMirror(
|
||||
const myCodeMirror4: CodeMirror.Editor = CodeMirror.fromTextArea(myTextArea);
|
||||
|
||||
const doc: CodeMirror.Doc = new CodeMirror.Doc('text');
|
||||
doc.lineSeparator();
|
||||
const doc2: CodeMirror.Doc = CodeMirror(document.body).getDoc();
|
||||
|
||||
const lintStateOptions: CodeMirror.LintStateOptions = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user