resolve tsc errors

This commit is contained in:
Andrew Varga
2025-06-16 11:50:37 +02:00
parent 5054672190
commit 1b65614c48

View File

@ -183,15 +183,14 @@ export class EditorFixture {
scrollToText(text: string, placeCursor?: boolean) {
return this.page.evaluate(
(args: { text: string; placeCursor?: boolean }) => {
const editorView = window.editorManager.getEditorView()
// error TS2339: Property 'docView' does not exist on type 'EditorView'.
// Except it does so :shrug:
// @ts-ignore
let index = window.editorManager
.getEditorView()
?.docView.view.state.doc.toString()
const index = editorView?.docView.view.state.doc.toString()
.indexOf(args.text)
window.editorManager.getEditorView()?.focus()
window.editorManager.getEditorView()?.dispatch({
editorView?.focus()
editorView?.dispatch({
selection: window.EditorSelection.create([
window.EditorSelection.cursor(index),
]),