Update setup workers

This commit is contained in:
Nate Kelley 2025-09-09 14:53:09 -06:00
parent 0d027823cb
commit deab17ff37
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
1 changed files with 3 additions and 2 deletions

View File

@ -6,8 +6,9 @@ import { isServer } from '@/lib/window';
export const setupMonacoWebWorker = (): void => {
if (!isServer) {
//@ts-expect-error
window.MonacoEnvironment = {
getWorker(_moduleId, label) {
getWorker(_moduleId: string, label: string) {
switch (label) {
case 'editorWorkerService':
return new Worker(editorWorkerUrl);
@ -16,7 +17,7 @@ export const setupMonacoWebWorker = (): void => {
case 'yaml':
return new Worker(yamlWorkerUrl);
default:
throw new Error(`Unknown label ${label}`);
throw new Error(`Unknown label ${label as string}`);
}
},
};