Skip to content

Commit 8e99fc6

Browse files
committed
fix: add typescript libraries to javascript model
1 parent a2a5210 commit 8e99fc6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

apps/playground/src/components/Editor/EditorPane.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export const EditorPane = React.forwardRef<EditorPaneRef, EditorPaneProps>(funct
5454
Object.keys(libs).forEach((filename) => {
5555
const uri = monaco.Uri.parse(filename);
5656
if (!monaco.editor.getModel(uri)) {
57+
monaco.languages.typescript.javascriptDefaults.addExtraLib(libs[filename]!, filename);
5758
monaco.languages.typescript.typescriptDefaults.addExtraLib(libs[filename]!, filename);
5859
monaco.editor.createModel(libs[filename]!, 'typescript', uri);
5960
}

0 commit comments

Comments
 (0)