File tree Expand file tree Collapse file tree
apps/playground/src/components/Editor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,11 +17,6 @@ class TypeScriptSuggestAdapter extends SuggestAdapter implements CompletionItemP
1717 override triggerCharacters = [ '.' , '"' , "'" ] ;
1818}
1919
20- const customEnv = `
21- declare module 'react/jsx-runtime' {
22- export * from '/runtime/v1/react@18.x/jsx-runtime'
23- }` ;
24-
2520self . MonacoEnvironment = {
2621 getWorker ( _ , label ) {
2722 if ( label === 'typescript' || label === 'javascript' ) {
@@ -156,6 +151,6 @@ loader.config({ monaco });
156151
157152 const uri = monaco . Uri . parse ( 'globals.d.ts' ) ;
158153
159- monaco . languages . typescript . typescriptDefaults . addExtraLib ( envTypes + customEnv , 'globals.d.ts' ) ;
154+ monaco . languages . typescript . typescriptDefaults . addExtraLib ( envTypes , 'globals.d.ts' ) ;
160155 monaco . editor . createModel ( envTypes , 'typescript' , uri ) ;
161156}
Original file line number Diff line number Diff line change @@ -27,3 +27,7 @@ declare module '*.webp' {
2727 const src : string ;
2828 export default src ;
2929}
30+
31+ declare module 'react/jsx-runtime' {
32+ export * from '/runtime/v1/react@18.x/jsx-runtime' ;
33+ }
You can’t perform that action at this time.
0 commit comments