From 2ee93bf0f2f333fd179ca62d2d63f682aff54713 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Fri, 5 Apr 2019 10:09:46 -0700 Subject: [PATCH] Add allowUmdGlobalAccess flag --- src/compiler/commandLineParser.ts | 6 ++++++ src/compiler/diagnosticMessages.json | 4 ++++ src/compiler/types.ts | 1 + 3 files changed, 11 insertions(+) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 12a20e0df42..c6dd100d0bc 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -603,6 +603,12 @@ namespace ts { category: Diagnostics.Source_Map_Options, description: Diagnostics.Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set }, + { + name: "allowUmdGlobalAccess", + type: "boolean", + category: Diagnostics.Module_Resolution_Options, + description: Diagnostics.Allow_accessing_UMD_globals_from_modules, + }, // Experimental { diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 7717f51bd50..63bcc0d90d9 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -4938,5 +4938,9 @@ "Convert parameters to destructured object": { "category": "Message", "code": 95075 + }, + "Allow accessing UMD globals from modules": { + "category": "Message", + "code": 95076 } } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 55492081050..7a554a8745e 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -4580,6 +4580,7 @@ namespace ts { allowJs?: boolean; /*@internal*/ allowNonTsExtensions?: boolean; allowSyntheticDefaultImports?: boolean; + allowUmdGlobalAccess?: boolean; allowUnreachableCode?: boolean; allowUnusedLabels?: boolean; alwaysStrict?: boolean; // Always combine with strict property