✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.
improve type
AykutSarace8496f9eadf3
diff --git a/src/containers/ConverterLayout/options.ts b/src/containers/ConverterLayout/options.tsindex 08c504cb..2387a299 100644--- a/src/containers/ConverterLayout/options.ts+++ b/src/containers/ConverterLayout/options.ts@@ -2,6 +2,7 @@ import type { EditorProps } from "@monaco-editor/react";export const editorOptions: EditorProps["options"] = {formatOnPaste: true,+ formatOnType: true,stopRenderingLineAfter: -1,minimap: { enabled: false },stickyScroll: { enabled: false },diff --git a/src/containers/Editor/components/TextEditor.tsx b/src/containers/Editor/components/TextEditor.tsxindex a8167199..cd9ae836 100644--- a/src/containers/Editor/components/TextEditor.tsx+++ b/src/containers/Editor/components/TextEditor.tsx@@ -14,9 +14,7 @@ loader.config({const editorOptions: EditorProps["options"] = {formatOnPaste: true,formatOnType: true,- minimap: {- enabled: false,- },+ minimap: { enabled: false },scrollBeyondLastLine: false,};diff --git a/src/pages/tools/json-schema.tsx b/src/pages/tools/json-schema.tsxindex df2a0388..0072203a 100644--- a/src/pages/tools/json-schema.tsx+++ b/src/pages/tools/json-schema.tsx@@ -1,6 +1,6 @@import React from "react";import { Box, Button, Container, Flex, Paper, Title, Text } from "@mantine/core";-import { Editor } from "@monaco-editor/react";+import { Editor, type OnMount } from "@monaco-editor/react";import { JSONSchemaFaker } from "json-schema-faker";import { LuCheck, LuXCircle } from "react-icons/lu";import { editorOptions } from "src/containers/ConverterLayout/options";@@ -10,7 +10,7 @@ import { generateType } from "src/lib/utils/generateType";import { jsonToContent } from "src/lib/utils/jsonAdapter";const JSONSchemaTool = () => {- const monacoRef = React.useRef<any>(null);+ const monacoRef = React.useRef<Parameters<OnMount>[1] | null>(null);const [jsonError, setJsonError] = React.useState(false);const [jsonSchemaError, setJsonSchemaError] = React.useState(false);const [json, setJson] = React.useState("");