Optimize CodeEditor. CodeEditor add tsconfig support.

This commit is contained in:
2024-01-13 22:16:29 +08:00
parent 8e880cc1ed
commit 97c23334f7
11 changed files with 1043 additions and 65 deletions

View File

@@ -1,4 +1,5 @@
import { editor } from 'monaco-editor'
import { editor, languages } from 'monaco-editor'
import CompilerOptions = languages.typescript.CompilerOptions
export type ILanguage = 'javascript' | 'typescript' | 'json' | 'css' | 'xml'
@@ -17,6 +18,10 @@ export interface IImportMap {
imports: Record<string, string>
}
export interface ITsConfig {
compilerOptions: CompilerOptions
}
export type ITheme = 'light' | 'vs-dark'
export type IEditorOptions = editor.IStandaloneEditorConstructionOptions