diff --git a/types/codemirror/codemirror-comment.d.ts b/types/codemirror/codemirror-comment.d.ts index e92935ef00..47b99fd989 100644 --- a/types/codemirror/codemirror-comment.d.ts +++ b/types/codemirror/codemirror-comment.d.ts @@ -13,7 +13,7 @@ declare module "codemirror" { interface Editor { /** Tries to uncomment the current selection, and if that fails, line-comments it. */ - toggleComment(from: Position, to: Position, options?: CommentOptions): void; + toggleComment(options?: CommentOptions): void; /** Set the lines in the given range to be line comments. Will fall back to `blockComment` when no line comment style is defined for the mode. */ lineComment(from: Position, to: Position, options?: CommentOptions): void; /** Wrap the code in the given range in a block comment. Will fall back to `lineComment` when no block comment style is defined for the mode. */ diff --git a/types/codemirror/test/comment.ts b/types/codemirror/test/comment.ts index 3f0fb0b663..f022704a86 100644 --- a/types/codemirror/test/comment.ts +++ b/types/codemirror/test/comment.ts @@ -10,7 +10,7 @@ const opt: CodeMirror.CommentOptions = { lineComment: "//", padding: " " }; -editor.toggleComment(position, position, opt); +editor.toggleComment(opt); editor.blockComment(position, position, opt); editor.lineComment(position, position, opt); const b: boolean = editor.uncomment(position, position, opt);