Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

FIX: The editor hover window doesn't show in the test cases #506 (#613)

Oussama boughizenee4ead8e3c479
diff --git a/packages/monaco/src/code-editor.tsx b/packages/monaco/src/code-editor.tsx
index f39acf7a..ded0cfae 100644
--- a/packages/monaco/src/code-editor.tsx
+++ b/packages/monaco/src/code-editor.tsx
@@ -5,6 +5,8 @@ import { useTheme } from 'next-themes';
import { useMemo } from 'react';
import { useEditorSettingsStore } from './settings-store';
import { libSource } from './editor-types';
+// eslint-disable-next-line @typescript-eslint/consistent-type-imports
+import * as MonacoEditor from 'monaco-editor';
const ADMIN_HOST = 'admin.typehero.dev';
const getBaseUrl = () => {
@@ -28,6 +30,7 @@ loader.config({
});
const DEFAULT_OPTIONS = {
+ fixedOverflowWidgets: true,
lineNumbers: 'on',
tabSize: 2,
insertSpaces: false,
@@ -39,7 +42,7 @@ const DEFAULT_OPTIONS = {
export const LIB_URI = 'file:///asserts.d.ts';
-export function loadCheckingLib(monaco: typeof import('monaco-editor')) {
+export function loadCheckingLib(monaco: typeof MonacoEditor) {
if (!monaco.editor.getModel(monaco.Uri.parse(LIB_URI))) {
monaco.languages.typescript.javascriptDefaults.addExtraLib(libSource, LIB_URI);
monaco.editor.createModel(libSource, 'typescript', monaco.Uri.parse(LIB_URI));