Skip to content

Commit

Permalink
feat: add typescript language on demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Mangeonjean committed May 30, 2023
1 parent cfb498e commit 1c8fbcc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion demo/src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import * as monaco from 'monaco-editor/esm/vs/editor/editor.api'
import { createConfiguredEditor } from 'vscode/monaco'
import 'vscode/default-extensions/theme-defaults'
import 'vscode/default-extensions/javascript'
import 'vscode/default-extensions/typescript-basics'
import 'vscode/default-extensions/json'
import 'vscode/default-extensions/theme-seti'
import 'vscode/default-extensions/references-view'
Expand Down Expand Up @@ -60,7 +61,8 @@ export type WorkerLoader = () => WorkerConstructor | Promise<WorkerConstructor>
const workerLoaders: Partial<Record<string, WorkerLoader>> = {
editorWorkerService: () => EditorWorker,
json: () => JsonWorker,
javascript: () => TypescriptWorker
javascript: () => TypescriptWorker,
typescript: () => TypescriptWorker
}
window.MonacoEnvironment = {
getWorker: async function (moduleId, label) {
Expand Down
2 changes: 1 addition & 1 deletion demo/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default defineConfig({
'vscode/service-override/audioCue', 'vscode/service-override/views', 'vscode/service-override/debug',
'vscode/service-override/preferences', 'vscode/service-override/snippets', 'vscode/service-override/files',
'vscode/default-extensions/theme-defaults', 'vscode/default-extensions/javascript', 'vscode/default-extensions/json', 'vscode/default-extensions/theme-seti',
'vscode/default-extensions/references-view'
'vscode/default-extensions/references-view', 'vscode/default-extensions/typescript-basics'
]
},
server: {
Expand Down

0 comments on commit 1c8fbcc

Please sign in to comment.