From fb848c370b679a53f034d0c9b9d9b1c879b9a3d5 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 13 Feb 2025 14:23:06 +0100 Subject: [PATCH] Type --- .../common/CodeEditor/CodeEditor.svelte | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/packages/builder/src/components/common/CodeEditor/CodeEditor.svelte b/packages/builder/src/components/common/CodeEditor/CodeEditor.svelte index 646c8bb92b..f96b8d10f3 100644 --- a/packages/builder/src/components/common/CodeEditor/CodeEditor.svelte +++ b/packages/builder/src/components/common/CodeEditor/CodeEditor.svelte @@ -43,7 +43,7 @@ } from "@codemirror/commands" import { setDiagnostics } from "@codemirror/lint" import type { Diagnostic } from "@codemirror/lint" - import { Compartment, EditorState } from "@codemirror/state" + import { Compartment, EditorState, Extension } from "@codemirror/state" import { javascript } from "@codemirror/lang-javascript" import { EditorModes } from "./" import { themeStore } from "@/stores/portal" @@ -321,26 +321,10 @@ return diagnostics } - // function getCompletions(): ((_: CompletionContext) => any)[] { - // switch (mode.name) { - // case "handlebars": - // return [hbAutocomplete([...completions])] - - // case "javascript": - // return [jsAutocomplete([...completions])] - - // case "text/html": - // return [] - - // default: - // throw utils.unreachable(mode) - // } - // } - // None of this is reactive, but it never has been, so we just assume most // config flags aren't changed at runtime // TODO: work out type for base - const buildExtensions = (base: any[]) => { + const buildExtensions = (base: Extension[]) => { let complete = [...base] if (autocompleteEnabled) {