From a29f2945c5b06f4aa238fac24c0f18803a8bfedc Mon Sep 17 00:00:00 2001 From: catloversg <152669316+catloversg@users.noreply.github.com> Date: Thu, 5 Feb 2026 22:31:13 +0700 Subject: [PATCH] BUGFIX: Monaco shows wrong TSDoc of APIs that have "export" word (#2473) --- src/ScriptEditor/ui/Editor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ScriptEditor/ui/Editor.tsx b/src/ScriptEditor/ui/Editor.tsx index ae28ac6c2..5a175e6ca 100644 --- a/src/ScriptEditor/ui/Editor.tsx +++ b/src/ScriptEditor/ui/Editor.tsx @@ -42,7 +42,7 @@ export function Editor({ onMount, onChange, onUnmount }: EditorProps) { * check: https://github.com/microsoft/monaco-editor/issues/3580 and https://github.com/microsoft/monaco-editor/pull/4544. */ monaco.editor.createModel( - netscriptDefinitions.replace(/export /g, ""), + netscriptDefinitions.replace(/^export /gm, ""), "typescript", monaco.Uri.file("netscript.d.ts"), );