Skip to content

Commit 1b05059

Browse files
committed
Supress the tslib not found diagnostic
1 parent 76b7d43 commit 1b05059

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/sandbox/src/index.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,12 @@ export const createTypeScriptSandbox = (
150150
? monaco.languages.typescript.javascriptDefaults
151151
: monaco.languages.typescript.typescriptDefaults
152152

153-
defaults.setDiagnosticsOptions({ ...defaults.getDiagnosticsOptions(), noSemanticValidation: false })
153+
defaults.setDiagnosticsOptions({
154+
...defaults.getDiagnosticsOptions(),
155+
noSemanticValidation: false,
156+
// This is when tslib is not found
157+
diagnosticCodesToIgnore: [2354],
158+
})
154159

155160
// In the future it'd be good to add support for an 'add many files'
156161
const addLibraryToRuntime = (code: string, path: string) => {

0 commit comments

Comments
 (0)