From 3237c18cb89c03d1bc8958c5dd3d452df33afb05 Mon Sep 17 00:00:00 2001 From: Kevin Zhang <42101107+Kevin101Zhang@users.noreply.github.com> Date: Tue, 30 Jul 2024 15:44:05 -0400 Subject: [PATCH] fix: used monaco compiler options latest (#913) fix: Set monaco compiler options to latest --- frontend/src/components/Editor/EditorComponents/Editor.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Editor/EditorComponents/Editor.tsx b/frontend/src/components/Editor/EditorComponents/Editor.tsx index 4daf5364..a11e8bde 100644 --- a/frontend/src/components/Editor/EditorComponents/Editor.tsx +++ b/frontend/src/components/Editor/EditorComponents/Editor.tsx @@ -282,8 +282,9 @@ const Editor: React.FC = (): ReactElement => { `${primitives}}`, 'file:///node_modules/@near-lake/primitives/index.d.ts', ); + monaco.languages.typescript.typescriptDefaults.setCompilerOptions({ - target: monaco.languages.typescript.ScriptTarget.ES2016, + target: monaco.languages.typescript.ScriptTarget.ES2018, allowNonTsExtensions: true, moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs, });