From 5ba85a40456550053b4a7ff0fca96ae2f5c9207e Mon Sep 17 00:00:00 2001 From: Andy Richardson Date: Mon, 1 Jul 2019 21:28:30 +0100 Subject: [PATCH] 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 --- types/codemirror/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/codemirror/index.d.ts b/types/codemirror/index.d.ts index 13a67ddfbe..55b41d60f4 100644 --- a/types/codemirror/index.d.ts +++ b/types/codemirror/index.d.ts @@ -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; } /**