Fix linting types which should be optional (#36445)

* Set linting 'async' rule to optional

https://github.com/codemirror/CodeMirror/blob/master/addon/lint/lint.js#L148

* Set 'getAnnotations' to optional

https://github.com/codemirror/CodeMirror/blob/master/addon/lint/lint.js#L147

* change 'hasGutters' to optional

https://github.com/codemirror/CodeMirror/blob/master/addon/lint/lint.js#L180
This commit is contained in:
Andy Richardson
2019-07-01 13:28:30 -07:00
committed by Ryan Cavanaugh
parent 5388a695f6
commit 5ba85a4045
+3 -3
View File
@@ -1446,8 +1446,8 @@ declare namespace CodeMirror {
* initialization of the CodeMirror instance.
*/
interface LintStateOptions {
async: boolean;
hasGutters: boolean;
async?: boolean;
hasGutters?: boolean;
onUpdateLinting?: (annotationsNotSorted: Annotation[], annotations: Annotation[], codeMirror: Editor) => void;
}
@@ -1456,7 +1456,7 @@ declare namespace CodeMirror {
* linter.
*/
interface LintOptions extends LintStateOptions {
getAnnotations: Linter | AsyncLinter;
getAnnotations?: Linter | AsyncLinter;
}
/**