[WEB-561] refactor: editor build config (#7442)

* refactor: editor build config

* fix: type errors
This commit is contained in:
Aaryan Khandelwal
2025-07-18 20:06:48 +05:30
committed by GitHub
parent df4ea1f7ac
commit d5eb374217
4 changed files with 7 additions and 2 deletions

View File

@@ -22,7 +22,7 @@
}
},
"scripts": {
"build": "tsup --minify",
"build": "tsc && tsup --minify",
"dev": "tsup --watch",
"check:lint": "eslint . --max-warnings 0",
"check:types": "tsc --noEmit",

View File

@@ -32,6 +32,7 @@ function scrollToNode(editor: Editor, pos: number): void {
}
}
// eslint-disable-next-line no-undef
export function scrollToNodeViaDOMCoordinates(editor: Editor, pos: number, behavior?: ScrollBehavior): void {
const view = editor.view;

View File

@@ -111,6 +111,7 @@ export interface EditorRefApi extends EditorReadOnlyRefApi {
onDocumentInfoChange: (callback: (documentInfo: TDocumentInfo) => void) => () => void;
onHeadingChange: (callback: (headings: IMarking[]) => void) => () => void;
onStateChange: (callback: () => void) => () => void;
// eslint-disable-next-line no-undef
scrollToNodeViaDOMCoordinates: (behavior?: ScrollBehavior, position?: number) => void;
setEditorValueAtCursorPosition: (content: string) => void;
setFocusAtPosition: (position: number) => void;

View File

@@ -4,8 +4,11 @@
"lib": ["ES2022", "DOM"],
"module": "ESNext",
"moduleResolution": "bundler",
"target": "ESNext",
"noEmit": true,
"skipLibCheck": true,
"sourceMap": true,
"target": "ESNext",
"types": ["node"],
"baseUrl": ".",
"paths": {
"@/*": ["./src/core/*"],