Skip to content

Commit 6c8ea37

Browse files
author
Orta Therox
authored
Merge pull request #864 from microsoft/add_importHelpers
Add import helpers to the playground config
2 parents 72b640f + 1b05059 commit 6c8ea37

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

packages/playground/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,8 @@ export const setupPlayground = (
386386
} else {
387387
sidebarTabs.style.display = "none"
388388
sidebarContent.style.display = "none"
389-
settingsContent.style.display = "block";
390-
(document.querySelector(".playground-sidebar label") as any).focus()
389+
settingsContent.style.display = "block"
390+
;(document.querySelector(".playground-sidebar label") as any).focus()
391391
}
392392
settingsToggle.parentElement!.classList.toggle("open")
393393
}
@@ -462,8 +462,8 @@ export const setupPlayground = (
462462
}
463463

464464
// Ensure that the editor is full-width when the screen resizes
465-
window.addEventListener('resize', () => {
466-
sandbox.editor.layout();
465+
window.addEventListener("resize", () => {
466+
sandbox.editor.layout()
467467
})
468468

469469
const ui = createUI()

packages/sandbox/src/compilerOptions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ export function getDefaultSandboxCompilerOptions(config: PlaygroundConfig, monac
4040
allowJs: config.useJavaScript,
4141
declaration: true,
4242

43+
importHelpers: false,
44+
4345
experimentalDecorators: true,
4446
emitDecoratorMetadata: true,
4547
moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs,

packages/sandbox/src/index.ts

Lines changed: 6 additions & 1 deletion
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) => {

packages/tsconfig-reference/scripts/tsconfigRules.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ export const defaultsForOptions = {
117117
inlineSourceMap: "false",
118118
inlineSources: "false",
119119
isolatedModules: "false",
120-
jsx: '`"react"`',
121120
jsxFactory: "`React.createElement`",
122121
keyofStringsOnly: "false",
123122
listEmittedFiles: "false",

packages/typescriptlang-org/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"strict": true,
88
"esModuleInterop": true,
99
"noEmit": true,
10+
"jsx": "react",
1011
"skipLibCheck": true,
1112
"noImplicitAny": false,
1213
"resolveJsonModule": true

0 commit comments

Comments
 (0)