1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-27 01:29:14 -05:00

BREAKING(cli/tsc): Enable isolatedModules by default (#8050)

This commit is contained in:
Nayeem Rahman 2020-10-23 11:38:35 +01:00 committed by GitHub
parent f56c7868ab
commit a3024a6dc5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 6 deletions

View file

@ -698,9 +698,6 @@ impl Graph2 {
options: CheckOptions,
) -> Result<(Stats, Diagnostics, Option<IgnoredCompilerOptions>), AnyError>
{
// TODO(@kitsonk) set to `true` in followup PR
let unstable = options.lib == TypeLib::UnstableDenoWindow
|| options.lib == TypeLib::UnstableDenoWorker;
let mut config = TsConfig::new(json!({
"allowJs": true,
// TODO(@kitsonk) is this really needed?
@ -708,7 +705,7 @@ impl Graph2 {
// Enabled by default to align to transpile/swc defaults
"experimentalDecorators": true,
"incremental": true,
"isolatedModules": unstable,
"isolatedModules": true,
"lib": options.lib,
"module": "esnext",
"strict": true,

View file

@ -716,8 +716,7 @@ pub async fn runtime_compile(
"allowNonTsExtensions": true,
"checkJs": false,
"esModuleInterop": true,
// TODO(lucacasonato): enable this by default in 1.5.0
"isolatedModules": unstable,
"isolatedModules": true,
"jsx": "react",
"module": "esnext",
"sourceMap": true,

View file

@ -69,6 +69,7 @@ const IGNORED_COMPILER_OPTIONS: [&str; 61] = [
"inlineSourceMap",
"inlineSources",
"init",
// TODO(nayeemrmn): Add "isolatedModules" here for 1.6.0.
"listEmittedFiles",
"listFiles",
"mapRoot",