fix typescript
Some checks failed
Node.js build / build (20.x) (push) Has been cancelled
Node.js build / build (22.x) (push) Has been cancelled

This commit is contained in:
2026-02-27 10:12:27 -05:00
parent 7022dadd83
commit 358ddca2f0
8 changed files with 386 additions and 452 deletions

View File

@@ -1,4 +1,4 @@
import { App, Editor, EditorRange, EditorTransaction, MarkdownView } from 'obsidian'
import { App, Editor, EditorRange, EditorTransaction, MarkdownFileInfo, MarkdownView } from 'obsidian'
import BindThemPlugin from './main'
import { selectionToLine, selectionToRange } from './Utils'
@@ -17,7 +17,7 @@ export class SelectionHelper {
/**
* Select the current line(s)
*/
public selectLine(editor: Editor, view: MarkdownView): void {
public selectLine(editor: Editor, view: MarkdownView | MarkdownFileInfo): void {
const selections = editor.listSelections()
const newSelectionRanges: Array<EditorRange> = []
@@ -36,7 +36,7 @@ export class SelectionHelper {
/**
* Select the current word(s)
*/
public selectWord(editor: Editor, view: MarkdownView): void {
public selectWord(editor: Editor, view: MarkdownView | MarkdownFileInfo): void {
const selections = editor.listSelections()
const newSelections: Array<EditorRange> = []