[codemirror] Add addon display/autorefresh (#42669)

* [codemirror] Add addon display/autorefresh

* [codemirror] Fix library name in comment

https://github.com/DefinitelyTyped/DefinitelyTyped/pull/42669#discussion_r385291863
This commit is contained in:
mtgto
2020-02-28 08:44:39 +09:00
committed by GitHub
parent 31dea29baa
commit 3ef5e0c92b
17 changed files with 38 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
// Type definitions for CodeMirror
// Type definitions for codemirror
// Project: https://github.com/marijnh/CodeMirror
// Definitions by: Nikolaj Kappler <https://github.com/nkappler>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

View File

@@ -0,0 +1,16 @@
// Type definitions for CodeMirror
// Project: https://github.com/marijnh/CodeMirror
// Definitions by: mtgto <https://github.com/mtgto>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// See docs https://codemirror.net/doc/manual.html#addon_autorefresh
import * as CodeMirror from "codemirror";
declare module "codemirror" {
interface EditorConfiguration {
// if true, it will be refreshed the first time the editor becomes visible.
// you can pass delay (msec) time as polling duration
autoRefresh?: boolean | { delay: number };
}
}

View File

@@ -1,4 +1,4 @@
// Type definitions for CodeMirror
// Type definitions for codemirror
// Project: https://github.com/marijnh/CodeMirror
// Definitions by: Nikolaj Kappler <https://github.com/nkappler>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

View File

@@ -1,4 +1,4 @@
// Type definitions for CodeMirror
// Type definitions for codemirror
// Project: https://github.com/codemirror/CodeMirror
// Definitions by: ficristo <https://github.com/ficristo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

View File

@@ -1,4 +1,4 @@
// Type definitions for CodeMirror
// Type definitions for codemirror
// Project: https://github.com/codemirror/CodeMirror
// Definitions by: ficristo <https://github.com/ficristo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

View File

@@ -1,4 +1,4 @@
// Type definitions for CodeMirror
// Type definitions for codemirror
// Project: https://github.com/marijnh/CodeMirror
// Definitions by: Sixin Li <https://github.com/sixinli>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

View File

@@ -1,4 +1,4 @@
// Type definitions for CodeMirror
// Type definitions for codemirror
// Project: https://github.com/codemirror/CodeMirror
// Definitions by: ficristo <https://github.com/ficristo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

View File

@@ -1,4 +1,4 @@
// Type definitions for CodeMirror
// Type definitions for codemirror
// Project: https://github.com/marijnh/CodeMirror
// Definitions by: jacqt <https://github.com/jacqt>
// basarat <https://github.com/basarat>

View File

@@ -1,4 +1,4 @@
// Type definitions for CodeMirror
// Type definitions for codemirror
// Project: https://github.com/marijnh/CodeMirror
// Definitions by: Joseph Vaughan <https://github.com/Joev->
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

View File

@@ -1,4 +1,4 @@
// Type definitions for CodeMirror
// Type definitions for codemirror
// Project: https://github.com/codemirror/CodeMirror
// Definitions by: ficristo <https://github.com/ficristo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

View File

@@ -1,4 +1,4 @@
// Type definitions for CodeMirror
// Type definitions for codemirror
// Project: https://github.com/codemirror/CodeMirror
// Definitions by: ficristo <https://github.com/ficristo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

View File

@@ -1,4 +1,4 @@
// Type definitions for CodeMirror
// Type definitions for codemirror
// Project: https://github.com/marijnh/CodeMirror
// Definitions by: jacqt <https://github.com/jacqt>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

View File

@@ -1,4 +1,4 @@
// Type definitions for CodeMirror
// Type definitions for codemirror
// Project: https://github.com/codemirror/CodeMirror
// Definitions by: ficristo <https://github.com/ficristo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

View File

@@ -1,4 +1,4 @@
// Type definitions for CodeMirror
// Type definitions for codemirror
// Project: https://github.com/marijnh/CodeMirror
// Definitions by: Nikolaj Kappler <https://github.com/nkappler>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

View File

@@ -1,4 +1,4 @@
// Type definitions for CodeMirror
// Type definitions for codemirror
// Project: https://github.com/marijnh/CodeMirror
// Definitions by: mihailik <https://github.com/mihailik>
// nrbernard <https://github.com/nrbernard>

View File

@@ -0,0 +1,6 @@
import * as CodeMirror from "codemirror";
import "codemirror/addon/display/autorefresh";
const myCodeMirror: CodeMirror.Editor = CodeMirror(document.body, {
autoRefresh: true
});

View File

@@ -22,6 +22,7 @@
"test/index.ts",
"test/addon/comment/comment.ts",
"test/addon/display/panel.ts",
"test/addon/display/autorefresh.ts",
"test/addon/edit/closebrackets.ts",
"test/addon/edit/closetag.ts",
"test/addon/edit/matchbrackets.ts",
@@ -34,4 +35,4 @@
"test/addon/selection/active-line.ts",
"test/addon/tern/tern.ts"
]
}
}