chore(codemirror): fix type errors

This commit is contained in:
Elian Doran 2025-05-27 23:33:45 +03:00
parent 44c502f9cc
commit fe8e090b1b
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
import { indentLess, indentMore } from "@codemirror/commands";
import { EditorSelection, EditorState, type ChangeSpec } from "@codemirror/state";
import { EditorSelection, EditorState, SelectionRange, type ChangeSpec } from "@codemirror/state";
import type { KeyBinding } from "@codemirror/view";
/**
@ -19,8 +19,8 @@ const smartIndentWithTab: KeyBinding[] = [
}
const { selection } = state;
const changes = [];
const newSelections = [];
const changes: ChangeSpec[] = [];
const newSelections: SelectionRange[] = [];
// Step 1: Handle non-empty selections → replace with tab
if (selection.ranges.some(range => !range.empty)) {

View File

@ -23,6 +23,6 @@
"src/**/*.spec.js",
"src/**/*.test.jsx",
"src/**/*.spec.jsx",
"src/**/*.d.ts"
"src/**/*.ts"
]
}