@angular/language-service 11.2.1 → 11.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v11.2.1
2
+ * @license Angular v11.2.5
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  * License: MIT
5
5
  */
@@ -29,6 +29,17 @@ module.exports = function(provided) {
29
29
 
30
30
  define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], function (exports, tss, ts, path) { 'use strict';
31
31
 
32
+ /**
33
+ * @license
34
+ * Copyright Google LLC All Rights Reserved.
35
+ *
36
+ * Use of this source code is governed by an MIT-style license that can be
37
+ * found in the LICENSE file at https://angular.io/license
38
+ */
39
+ function isNgLanguageService(ls) {
40
+ return 'getTcb' in ls;
41
+ }
42
+
32
43
  /**
33
44
  * @license
34
45
  * Copyright Google LLC All Rights Reserved.
@@ -1894,211 +1905,6 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
1894
1905
  return out;
1895
1906
  }
1896
1907
 
1897
- /**
1898
- * @license
1899
- * Copyright Google LLC All Rights Reserved.
1900
- *
1901
- * Use of this source code is governed by an MIT-style license that can be
1902
- * found in the LICENSE file at https://angular.io/license
1903
- */
1904
- const DASH_CASE_REGEXP = /-+([a-z0-9])/g;
1905
- function dashCaseToCamelCase(input) {
1906
- return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());
1907
- }
1908
- function splitAtColon(input, defaultValues) {
1909
- return _splitAt(input, ':', defaultValues);
1910
- }
1911
- function splitAtPeriod(input, defaultValues) {
1912
- return _splitAt(input, '.', defaultValues);
1913
- }
1914
- function _splitAt(input, character, defaultValues) {
1915
- const characterIndex = input.indexOf(character);
1916
- if (characterIndex == -1)
1917
- return defaultValues;
1918
- return [input.slice(0, characterIndex).trim(), input.slice(characterIndex + 1).trim()];
1919
- }
1920
- function visitValue(value, visitor, context) {
1921
- if (Array.isArray(value)) {
1922
- return visitor.visitArray(value, context);
1923
- }
1924
- if (isStrictStringMap(value)) {
1925
- return visitor.visitStringMap(value, context);
1926
- }
1927
- if (value == null || typeof value == 'string' || typeof value == 'number' ||
1928
- typeof value == 'boolean') {
1929
- return visitor.visitPrimitive(value, context);
1930
- }
1931
- return visitor.visitOther(value, context);
1932
- }
1933
- function isDefined(val) {
1934
- return val !== null && val !== undefined;
1935
- }
1936
- function noUndefined(val) {
1937
- return val === undefined ? null : val;
1938
- }
1939
- class ValueTransformer {
1940
- visitArray(arr, context) {
1941
- return arr.map(value => visitValue(value, this, context));
1942
- }
1943
- visitStringMap(map, context) {
1944
- const result = {};
1945
- Object.keys(map).forEach(key => {
1946
- result[key] = visitValue(map[key], this, context);
1947
- });
1948
- return result;
1949
- }
1950
- visitPrimitive(value, context) {
1951
- return value;
1952
- }
1953
- visitOther(value, context) {
1954
- return value;
1955
- }
1956
- }
1957
- const SyncAsync = {
1958
- assertSync: (value) => {
1959
- if (isPromise(value)) {
1960
- throw new Error(`Illegal state: value cannot be a promise`);
1961
- }
1962
- return value;
1963
- },
1964
- then: (value, cb) => {
1965
- return isPromise(value) ? value.then(cb) : cb(value);
1966
- },
1967
- all: (syncAsyncValues) => {
1968
- return syncAsyncValues.some(isPromise) ? Promise.all(syncAsyncValues) : syncAsyncValues;
1969
- }
1970
- };
1971
- function error(msg) {
1972
- throw new Error(`Internal Error: ${msg}`);
1973
- }
1974
- function syntaxError(msg, parseErrors) {
1975
- const error = Error(msg);
1976
- error[ERROR_SYNTAX_ERROR] = true;
1977
- if (parseErrors)
1978
- error[ERROR_PARSE_ERRORS] = parseErrors;
1979
- return error;
1980
- }
1981
- const ERROR_SYNTAX_ERROR = 'ngSyntaxError';
1982
- const ERROR_PARSE_ERRORS = 'ngParseErrors';
1983
- const STRING_MAP_PROTO = Object.getPrototypeOf({});
1984
- function isStrictStringMap(obj) {
1985
- return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;
1986
- }
1987
- function utf8Encode(str) {
1988
- let encoded = [];
1989
- for (let index = 0; index < str.length; index++) {
1990
- let codePoint = str.charCodeAt(index);
1991
- // decode surrogate
1992
- // see https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
1993
- if (codePoint >= 0xd800 && codePoint <= 0xdbff && str.length > (index + 1)) {
1994
- const low = str.charCodeAt(index + 1);
1995
- if (low >= 0xdc00 && low <= 0xdfff) {
1996
- index++;
1997
- codePoint = ((codePoint - 0xd800) << 10) + low - 0xdc00 + 0x10000;
1998
- }
1999
- }
2000
- if (codePoint <= 0x7f) {
2001
- encoded.push(codePoint);
2002
- }
2003
- else if (codePoint <= 0x7ff) {
2004
- encoded.push(((codePoint >> 6) & 0x1F) | 0xc0, (codePoint & 0x3f) | 0x80);
2005
- }
2006
- else if (codePoint <= 0xffff) {
2007
- encoded.push((codePoint >> 12) | 0xe0, ((codePoint >> 6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);
2008
- }
2009
- else if (codePoint <= 0x1fffff) {
2010
- encoded.push(((codePoint >> 18) & 0x07) | 0xf0, ((codePoint >> 12) & 0x3f) | 0x80, ((codePoint >> 6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);
2011
- }
2012
- }
2013
- return encoded;
2014
- }
2015
- function stringify(token) {
2016
- if (typeof token === 'string') {
2017
- return token;
2018
- }
2019
- if (Array.isArray(token)) {
2020
- return '[' + token.map(stringify).join(', ') + ']';
2021
- }
2022
- if (token == null) {
2023
- return '' + token;
2024
- }
2025
- if (token.overriddenName) {
2026
- return `${token.overriddenName}`;
2027
- }
2028
- if (token.name) {
2029
- return `${token.name}`;
2030
- }
2031
- if (!token.toString) {
2032
- return 'object';
2033
- }
2034
- // WARNING: do not try to `JSON.stringify(token)` here
2035
- // see https://github.com/angular/angular/issues/23440
2036
- const res = token.toString();
2037
- if (res == null) {
2038
- return '' + res;
2039
- }
2040
- const newLineIndex = res.indexOf('\n');
2041
- return newLineIndex === -1 ? res : res.substring(0, newLineIndex);
2042
- }
2043
- /**
2044
- * Lazily retrieves the reference value from a forwardRef.
2045
- */
2046
- function resolveForwardRef(type) {
2047
- if (typeof type === 'function' && type.hasOwnProperty('__forward_ref__')) {
2048
- return type();
2049
- }
2050
- else {
2051
- return type;
2052
- }
2053
- }
2054
- /**
2055
- * Determine if the argument is shaped like a Promise
2056
- */
2057
- function isPromise(obj) {
2058
- // allow any Promise/A+ compliant thenable.
2059
- // It's up to the caller to ensure that obj.then conforms to the spec
2060
- return !!obj && typeof obj.then === 'function';
2061
- }
2062
- class Version {
2063
- constructor(full) {
2064
- this.full = full;
2065
- const splits = full.split('.');
2066
- this.major = splits[0];
2067
- this.minor = splits[1];
2068
- this.patch = splits.slice(2).join('.');
2069
- }
2070
- }
2071
- const __window = typeof window !== 'undefined' && window;
2072
- const __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&
2073
- self instanceof WorkerGlobalScope && self;
2074
- const __global = typeof global !== 'undefined' && global;
2075
- // Check __global first, because in Node tests both __global and __window may be defined and _global
2076
- // should be __global in that case.
2077
- const _global = __global || __window || __self;
2078
- function newArray(size, value) {
2079
- const list = [];
2080
- for (let i = 0; i < size; i++) {
2081
- list.push(value);
2082
- }
2083
- return list;
2084
- }
2085
- /**
2086
- * Partitions a given array into 2 arrays, based on a boolean value returned by the condition
2087
- * function.
2088
- *
2089
- * @param arr Input array that should be partitioned
2090
- * @param conditionFn Condition function that is called for each item in a given array and returns a
2091
- * boolean value.
2092
- */
2093
- function partitionArray(arr, conditionFn) {
2094
- const truthy = [];
2095
- const falsy = [];
2096
- for (const item of arr) {
2097
- (conditionFn(item) ? truthy : falsy).push(item);
2098
- }
2099
- return [truthy, falsy];
2100
- }
2101
-
2102
1908
  /**
2103
1909
  * @license
2104
1910
  * Copyright Google LLC All Rights Reserved.
@@ -2308,8 +2114,6 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
2308
2114
  case 3 /* Pipe */:
2309
2115
  return this.pipeDefinitions;
2310
2116
  }
2311
- error(`Unknown definition kind ${kind}`);
2312
- return this.componentDefinitions;
2313
2117
  }
2314
2118
  propertyNameOf(kind) {
2315
2119
  switch (kind) {
@@ -2322,8 +2126,6 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
2322
2126
  case 3 /* Pipe */:
2323
2127
  return 'ɵpipe';
2324
2128
  }
2325
- error(`Unknown definition kind ${kind}`);
2326
- return '<unknown>';
2327
2129
  }
2328
2130
  freshName() {
2329
2131
  return this.uniqueName(CONSTANT_PREFIX);
@@ -2557,6 +2359,211 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
2557
2359
  }
2558
2360
  }
2559
2361
 
2362
+ /**
2363
+ * @license
2364
+ * Copyright Google LLC All Rights Reserved.
2365
+ *
2366
+ * Use of this source code is governed by an MIT-style license that can be
2367
+ * found in the LICENSE file at https://angular.io/license
2368
+ */
2369
+ const DASH_CASE_REGEXP = /-+([a-z0-9])/g;
2370
+ function dashCaseToCamelCase(input) {
2371
+ return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());
2372
+ }
2373
+ function splitAtColon(input, defaultValues) {
2374
+ return _splitAt(input, ':', defaultValues);
2375
+ }
2376
+ function splitAtPeriod(input, defaultValues) {
2377
+ return _splitAt(input, '.', defaultValues);
2378
+ }
2379
+ function _splitAt(input, character, defaultValues) {
2380
+ const characterIndex = input.indexOf(character);
2381
+ if (characterIndex == -1)
2382
+ return defaultValues;
2383
+ return [input.slice(0, characterIndex).trim(), input.slice(characterIndex + 1).trim()];
2384
+ }
2385
+ function visitValue(value, visitor, context) {
2386
+ if (Array.isArray(value)) {
2387
+ return visitor.visitArray(value, context);
2388
+ }
2389
+ if (isStrictStringMap(value)) {
2390
+ return visitor.visitStringMap(value, context);
2391
+ }
2392
+ if (value == null || typeof value == 'string' || typeof value == 'number' ||
2393
+ typeof value == 'boolean') {
2394
+ return visitor.visitPrimitive(value, context);
2395
+ }
2396
+ return visitor.visitOther(value, context);
2397
+ }
2398
+ function isDefined(val) {
2399
+ return val !== null && val !== undefined;
2400
+ }
2401
+ function noUndefined(val) {
2402
+ return val === undefined ? null : val;
2403
+ }
2404
+ class ValueTransformer {
2405
+ visitArray(arr, context) {
2406
+ return arr.map(value => visitValue(value, this, context));
2407
+ }
2408
+ visitStringMap(map, context) {
2409
+ const result = {};
2410
+ Object.keys(map).forEach(key => {
2411
+ result[key] = visitValue(map[key], this, context);
2412
+ });
2413
+ return result;
2414
+ }
2415
+ visitPrimitive(value, context) {
2416
+ return value;
2417
+ }
2418
+ visitOther(value, context) {
2419
+ return value;
2420
+ }
2421
+ }
2422
+ const SyncAsync = {
2423
+ assertSync: (value) => {
2424
+ if (isPromise(value)) {
2425
+ throw new Error(`Illegal state: value cannot be a promise`);
2426
+ }
2427
+ return value;
2428
+ },
2429
+ then: (value, cb) => {
2430
+ return isPromise(value) ? value.then(cb) : cb(value);
2431
+ },
2432
+ all: (syncAsyncValues) => {
2433
+ return syncAsyncValues.some(isPromise) ? Promise.all(syncAsyncValues) : syncAsyncValues;
2434
+ }
2435
+ };
2436
+ function error(msg) {
2437
+ throw new Error(`Internal Error: ${msg}`);
2438
+ }
2439
+ function syntaxError(msg, parseErrors) {
2440
+ const error = Error(msg);
2441
+ error[ERROR_SYNTAX_ERROR] = true;
2442
+ if (parseErrors)
2443
+ error[ERROR_PARSE_ERRORS] = parseErrors;
2444
+ return error;
2445
+ }
2446
+ const ERROR_SYNTAX_ERROR = 'ngSyntaxError';
2447
+ const ERROR_PARSE_ERRORS = 'ngParseErrors';
2448
+ const STRING_MAP_PROTO = Object.getPrototypeOf({});
2449
+ function isStrictStringMap(obj) {
2450
+ return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;
2451
+ }
2452
+ function utf8Encode(str) {
2453
+ let encoded = [];
2454
+ for (let index = 0; index < str.length; index++) {
2455
+ let codePoint = str.charCodeAt(index);
2456
+ // decode surrogate
2457
+ // see https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
2458
+ if (codePoint >= 0xd800 && codePoint <= 0xdbff && str.length > (index + 1)) {
2459
+ const low = str.charCodeAt(index + 1);
2460
+ if (low >= 0xdc00 && low <= 0xdfff) {
2461
+ index++;
2462
+ codePoint = ((codePoint - 0xd800) << 10) + low - 0xdc00 + 0x10000;
2463
+ }
2464
+ }
2465
+ if (codePoint <= 0x7f) {
2466
+ encoded.push(codePoint);
2467
+ }
2468
+ else if (codePoint <= 0x7ff) {
2469
+ encoded.push(((codePoint >> 6) & 0x1F) | 0xc0, (codePoint & 0x3f) | 0x80);
2470
+ }
2471
+ else if (codePoint <= 0xffff) {
2472
+ encoded.push((codePoint >> 12) | 0xe0, ((codePoint >> 6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);
2473
+ }
2474
+ else if (codePoint <= 0x1fffff) {
2475
+ encoded.push(((codePoint >> 18) & 0x07) | 0xf0, ((codePoint >> 12) & 0x3f) | 0x80, ((codePoint >> 6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);
2476
+ }
2477
+ }
2478
+ return encoded;
2479
+ }
2480
+ function stringify(token) {
2481
+ if (typeof token === 'string') {
2482
+ return token;
2483
+ }
2484
+ if (Array.isArray(token)) {
2485
+ return '[' + token.map(stringify).join(', ') + ']';
2486
+ }
2487
+ if (token == null) {
2488
+ return '' + token;
2489
+ }
2490
+ if (token.overriddenName) {
2491
+ return `${token.overriddenName}`;
2492
+ }
2493
+ if (token.name) {
2494
+ return `${token.name}`;
2495
+ }
2496
+ if (!token.toString) {
2497
+ return 'object';
2498
+ }
2499
+ // WARNING: do not try to `JSON.stringify(token)` here
2500
+ // see https://github.com/angular/angular/issues/23440
2501
+ const res = token.toString();
2502
+ if (res == null) {
2503
+ return '' + res;
2504
+ }
2505
+ const newLineIndex = res.indexOf('\n');
2506
+ return newLineIndex === -1 ? res : res.substring(0, newLineIndex);
2507
+ }
2508
+ /**
2509
+ * Lazily retrieves the reference value from a forwardRef.
2510
+ */
2511
+ function resolveForwardRef(type) {
2512
+ if (typeof type === 'function' && type.hasOwnProperty('__forward_ref__')) {
2513
+ return type();
2514
+ }
2515
+ else {
2516
+ return type;
2517
+ }
2518
+ }
2519
+ /**
2520
+ * Determine if the argument is shaped like a Promise
2521
+ */
2522
+ function isPromise(obj) {
2523
+ // allow any Promise/A+ compliant thenable.
2524
+ // It's up to the caller to ensure that obj.then conforms to the spec
2525
+ return !!obj && typeof obj.then === 'function';
2526
+ }
2527
+ class Version {
2528
+ constructor(full) {
2529
+ this.full = full;
2530
+ const splits = full.split('.');
2531
+ this.major = splits[0];
2532
+ this.minor = splits[1];
2533
+ this.patch = splits.slice(2).join('.');
2534
+ }
2535
+ }
2536
+ const __window = typeof window !== 'undefined' && window;
2537
+ const __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&
2538
+ self instanceof WorkerGlobalScope && self;
2539
+ const __global = typeof global !== 'undefined' && global;
2540
+ // Check __global first, because in Node tests both __global and __window may be defined and _global
2541
+ // should be __global in that case.
2542
+ const _global = __global || __window || __self;
2543
+ function newArray(size, value) {
2544
+ const list = [];
2545
+ for (let i = 0; i < size; i++) {
2546
+ list.push(value);
2547
+ }
2548
+ return list;
2549
+ }
2550
+ /**
2551
+ * Partitions a given array into 2 arrays, based on a boolean value returned by the condition
2552
+ * function.
2553
+ *
2554
+ * @param arr Input array that should be partitioned
2555
+ * @param conditionFn Condition function that is called for each item in a given array and returns a
2556
+ * boolean value.
2557
+ */
2558
+ function partitionArray(arr, conditionFn) {
2559
+ const truthy = [];
2560
+ const falsy = [];
2561
+ for (const item of arr) {
2562
+ (conditionFn(item) ? truthy : falsy).push(item);
2563
+ }
2564
+ return [truthy, falsy];
2565
+ }
2566
+
2560
2567
  /**
2561
2568
  * @license
2562
2569
  * Copyright Google LLC All Rights Reserved.
@@ -3116,10 +3123,6 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
3116
3123
  Identifiers$1.CopyDefinitionFeature = { name: 'ɵɵCopyDefinitionFeature', moduleName: CORE$1 };
3117
3124
  Identifiers$1.ProvidersFeature = { name: 'ɵɵProvidersFeature', moduleName: CORE$1 };
3118
3125
  Identifiers$1.listener = { name: 'ɵɵlistener', moduleName: CORE$1 };
3119
- Identifiers$1.getFactoryOf = {
3120
- name: 'ɵɵgetFactoryOf',
3121
- moduleName: CORE$1,
3122
- };
3123
3126
  Identifiers$1.getInheritedFactory = {
3124
3127
  name: 'ɵɵgetInheritedFactory',
3125
3128
  moduleName: CORE$1,
@@ -5074,7 +5077,6 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
5074
5077
  (function (R3FactoryDelegateType) {
5075
5078
  R3FactoryDelegateType[R3FactoryDelegateType["Class"] = 0] = "Class";
5076
5079
  R3FactoryDelegateType[R3FactoryDelegateType["Function"] = 1] = "Function";
5077
- R3FactoryDelegateType[R3FactoryDelegateType["Factory"] = 2] = "Factory";
5078
5080
  })(R3FactoryDelegateType || (R3FactoryDelegateType = {}));
5079
5081
  var R3FactoryTarget;
5080
5082
  (function (R3FactoryTarget) {
@@ -5162,19 +5164,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
5162
5164
  body.push(ifStmt(t, [ctorStmt], [r.set(nonCtorExpr).toStmt()]));
5163
5165
  return r;
5164
5166
  }
5165
- if (isDelegatedMetadata(meta) && meta.delegateType === R3FactoryDelegateType.Factory) {
5166
- const delegateFactory = variable(`ɵ${meta.name}_BaseFactory`);
5167
- const getFactoryOf = importExpr(Identifiers$1.getFactoryOf);
5168
- if (meta.delegate.isEquivalent(meta.internalType)) {
5169
- throw new Error(`Illegal state: compiling factory that delegates to itself`);
5170
- }
5171
- const delegateFactoryStmt = delegateFactory.set(getFactoryOf.callFn([meta.delegate])).toDeclStmt(INFERRED_TYPE, [
5172
- StmtModifier.Exported, StmtModifier.Final
5173
- ]);
5174
- statements.push(delegateFactoryStmt);
5175
- retExpr = makeConditionalFactory(delegateFactory.callFn([]));
5176
- }
5177
- else if (isDelegatedMetadata(meta)) {
5167
+ if (isDelegatedMetadata(meta)) {
5178
5168
  // This type is created with a delegated factory. If a type parameter is not specified, call
5179
5169
  // the factory instead.
5180
5170
  const delegateArgs = injectDependencies(meta.delegateDeps, meta.injectFn, meta.target === R3FactoryTarget.Pipe);
@@ -6196,21 +6186,6 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
6196
6186
  }
6197
6187
  }
6198
6188
 
6199
- /**
6200
- * @license
6201
- * Copyright Google LLC All Rights Reserved.
6202
- *
6203
- * Use of this source code is governed by an MIT-style license that can be
6204
- * found in the LICENSE file at https://angular.io/license
6205
- */
6206
- function mapLiteral(obj, quoted = false) {
6207
- return literalMap(Object.keys(obj).map(key => ({
6208
- key,
6209
- quoted,
6210
- value: obj[key],
6211
- })));
6212
- }
6213
-
6214
6189
  /**
6215
6190
  * @license
6216
6191
  * Copyright Google LLC All Rights Reserved.
@@ -6301,18 +6276,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
6301
6276
  return iifeCall.toStmt();
6302
6277
  }
6303
6278
  function compileInjector(meta) {
6304
- const result = compileFactoryFunction({
6305
- name: meta.name,
6306
- type: meta.type,
6307
- internalType: meta.internalType,
6308
- typeArgumentCount: 0,
6309
- deps: meta.deps,
6310
- injectFn: Identifiers$1.inject,
6311
- target: R3FactoryTarget.NgModule,
6312
- });
6313
- const definitionMap = {
6314
- factory: result.factory,
6315
- };
6279
+ const definitionMap = {};
6316
6280
  if (meta.providers !== null) {
6317
6281
  definitionMap.providers = meta.providers;
6318
6282
  }
@@ -6321,7 +6285,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
6321
6285
  }
6322
6286
  const expression = importExpr(Identifiers$1.defineInjector).callFn([mapToMapExpression(definitionMap)]);
6323
6287
  const type = new ExpressionType(importExpr(Identifiers$1.InjectorDef, [new ExpressionType(meta.type.type)]));
6324
- return { expression, type, statements: result.statements };
6288
+ return { expression, type };
6325
6289
  }
6326
6290
  function tupleTypeOf(exp) {
6327
6291
  const types = exp.map(ref => typeofExpr(ref.type));
@@ -9279,7 +9243,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
9279
9243
  tagName = openTagToken.parts[1];
9280
9244
  this._attemptCharCodeUntilFn(isNotWhitespace);
9281
9245
  while (this._cursor.peek() !== $SLASH && this._cursor.peek() !== $GT &&
9282
- this._cursor.peek() !== $LT) {
9246
+ this._cursor.peek() !== $LT && this._cursor.peek() !== $EOF) {
9283
9247
  this._consumeAttributeName();
9284
9248
  this._attemptCharCodeUntilFn(isNotWhitespace);
9285
9249
  if (this._attemptCharCode($EQ)) {
@@ -9505,7 +9469,8 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
9505
9469
  }
9506
9470
  function isNameEnd(code) {
9507
9471
  return isWhitespace(code) || code === $GT || code === $LT ||
9508
- code === $SLASH || code === $SQ || code === $DQ || code === $EQ;
9472
+ code === $SLASH || code === $SQ || code === $DQ || code === $EQ ||
9473
+ code === $EOF;
9509
9474
  }
9510
9475
  function isPrefixEnd(code) {
9511
9476
  return (code < $a || $z < code) && (code < $A || $Z < code) &&
@@ -14458,6 +14423,21 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
14458
14423
  }
14459
14424
  }
14460
14425
 
14426
+ /**
14427
+ * @license
14428
+ * Copyright Google LLC All Rights Reserved.
14429
+ *
14430
+ * Use of this source code is governed by an MIT-style license that can be
14431
+ * found in the LICENSE file at https://angular.io/license
14432
+ */
14433
+ function mapLiteral(obj, quoted = false) {
14434
+ return literalMap(Object.keys(obj).map(key => ({
14435
+ key,
14436
+ quoted,
14437
+ value: obj[key],
14438
+ })));
14439
+ }
14440
+
14461
14441
  /**
14462
14442
  * @license
14463
14443
  * Copyright Google LLC All Rights Reserved.
@@ -14657,7 +14637,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
14657
14637
  'progress^[HTMLElement]|#max,#value',
14658
14638
  'q,blockquote,cite^[HTMLElement]|',
14659
14639
  'script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,src,text,type',
14660
- 'select^[HTMLElement]|!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value',
14640
+ 'select^[HTMLElement]|autocomplete,!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value',
14661
14641
  'shadow^[HTMLElement]|',
14662
14642
  'slot^[HTMLElement]|name',
14663
14643
  'source^[HTMLElement]|media,sizes,src,srcset,type',
@@ -14670,7 +14650,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
14670
14650
  'tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign',
14671
14651
  'tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign',
14672
14652
  'template^[HTMLElement]|',
14673
- 'textarea^[HTMLElement]|autocapitalize,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap',
14653
+ 'textarea^[HTMLElement]|autocapitalize,autocomplete,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap',
14674
14654
  'title^[HTMLElement]|text',
14675
14655
  'track^[HTMLElement]|!default,kind,label,src,srclang',
14676
14656
  'ul^[HTMLElement]|!compact,type',
@@ -17977,9 +17957,8 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
17977
17957
  const bindingParser = makeBindingParser(interpolationConfig);
17978
17958
  const htmlParser = new HtmlParser();
17979
17959
  const parseResult = htmlParser.parse(template, templateUrl, Object.assign(Object.assign({ leadingTriviaChars: LEADING_TRIVIA_CHARS }, options), { tokenizeExpansionForms: true }));
17980
- if (parseResult.errors && parseResult.errors.length > 0) {
17981
- // TODO(ayazhafiz): we may not always want to bail out at this point (e.g. in
17982
- // the context of a language service).
17960
+ if (!options.alwaysAttemptHtmlToR3AstConversion && parseResult.errors &&
17961
+ parseResult.errors.length > 0) {
17983
17962
  return {
17984
17963
  interpolationConfig,
17985
17964
  preserveWhitespaces,
@@ -18000,7 +17979,8 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
18000
17979
  // message ids
18001
17980
  const i18nMetaVisitor = new I18nMetaVisitor(interpolationConfig, /* keepI18nAttrs */ !preserveWhitespaces, enableI18nLegacyMessageIdFormat);
18002
17981
  const i18nMetaResult = i18nMetaVisitor.visitAllWithErrors(rootNodes);
18003
- if (i18nMetaResult.errors && i18nMetaResult.errors.length > 0) {
17982
+ if (!options.alwaysAttemptHtmlToR3AstConversion && i18nMetaResult.errors &&
17983
+ i18nMetaResult.errors.length > 0) {
18004
17984
  return {
18005
17985
  interpolationConfig,
18006
17986
  preserveWhitespaces,
@@ -18026,6 +18006,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
18026
18006
  }
18027
18007
  }
18028
18008
  const { nodes, errors, styleUrls, styles, ngContentSelectors } = htmlAstToRender3Ast(rootNodes, bindingParser);
18009
+ errors.push(...parseResult.errors, ...i18nMetaResult.errors);
18029
18010
  return {
18030
18011
  interpolationConfig,
18031
18012
  preserveWhitespaces,
@@ -18801,7 +18782,8 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
18801
18782
  }
18802
18783
  compilePipeDeclaration(angularCoreEnv, sourceMapUrl, declaration) {
18803
18784
  const meta = convertDeclarePipeFacadeToMetadata(declaration);
18804
- return compilePipeFromMetadata(meta);
18785
+ const res = compilePipeFromMetadata(meta);
18786
+ return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);
18805
18787
  }
18806
18788
  compileInjectable(angularCoreEnv, sourceMapUrl, facade) {
18807
18789
  const { expression, statements } = compileInjectable({
@@ -18823,12 +18805,11 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
18823
18805
  name: facade.name,
18824
18806
  type: wrapReference(facade.type),
18825
18807
  internalType: new WrappedNodeExpr(facade.type),
18826
- deps: convertR3DependencyMetadataArray(facade.deps),
18827
18808
  providers: new WrappedNodeExpr(facade.providers),
18828
18809
  imports: facade.imports.map(i => new WrappedNodeExpr(i)),
18829
18810
  };
18830
18811
  const res = compileInjector(meta);
18831
- return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, res.statements);
18812
+ return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);
18832
18813
  }
18833
18814
  compileNgModule(angularCoreEnv, sourceMapUrl, facade) {
18834
18815
  const meta = {
@@ -19156,7 +19137,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
19156
19137
  * Use of this source code is governed by an MIT-style license that can be
19157
19138
  * found in the LICENSE file at https://angular.io/license
19158
19139
  */
19159
- const VERSION$1 = new Version('11.2.1');
19140
+ const VERSION$1 = new Version('11.2.5');
19160
19141
 
19161
19142
  /**
19162
19143
  * @license
@@ -24283,7 +24264,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
24283
24264
  'progress^[HTMLElement]|#max,#value',
24284
24265
  'q,blockquote,cite^[HTMLElement]|',
24285
24266
  'script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,src,text,type',
24286
- 'select^[HTMLElement]|!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value',
24267
+ 'select^[HTMLElement]|autocomplete,!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value',
24287
24268
  'shadow^[HTMLElement]|',
24288
24269
  'slot^[HTMLElement]|name',
24289
24270
  'source^[HTMLElement]|media,sizes,src,srcset,type',
@@ -24296,7 +24277,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
24296
24277
  'tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign',
24297
24278
  'tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign',
24298
24279
  'template^[HTMLElement]|',
24299
- 'textarea^[HTMLElement]|autocapitalize,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap',
24280
+ 'textarea^[HTMLElement]|autocapitalize,autocomplete,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap',
24300
24281
  'title^[HTMLElement]|text',
24301
24282
  'track^[HTMLElement]|!default,kind,label,src,srclang',
24302
24283
  'ul^[HTMLElement]|!compact,type',
@@ -25862,7 +25843,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
25862
25843
  * These directives allows declaration of "let" variables, adds context-specific
25863
25844
  * symbols like $implicit, index, count, among other behaviors.
25864
25845
  * For a complete description of such format, see
25865
- * https://angular.io/guide/structural-directives#the-asterisk--prefix
25846
+ * https://angular.io/guide/structural-directives#asterisk
25866
25847
  *
25867
25848
  * @param attr descriptor for attribute name and value pair
25868
25849
  * @param binding template binding for the expression in the attribute
@@ -27020,6 +27001,98 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
27020
27001
  fn.__forward_ref__ === forwardRef;
27021
27002
  }
27022
27003
 
27004
+ /**
27005
+ * @license
27006
+ * Copyright Google LLC All Rights Reserved.
27007
+ *
27008
+ * Use of this source code is governed by an MIT-style license that can be
27009
+ * found in the LICENSE file at https://angular.io/license
27010
+ */
27011
+ // Base URL for the error details page.
27012
+ // Keep this value in sync with a similar const in
27013
+ // `packages/compiler-cli/src/ngtsc/diagnostics/src/error_code.ts`.
27014
+ const ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors';
27015
+ class RuntimeError extends Error {
27016
+ constructor(code, message) {
27017
+ super(formatRuntimeError(code, message));
27018
+ this.code = code;
27019
+ }
27020
+ }
27021
+ // Contains a set of error messages that have details guides at angular.io.
27022
+ // Full list of available error guides can be found at https://angular.io/errors
27023
+ /* tslint:disable:no-toplevel-property-access */
27024
+ const RUNTIME_ERRORS_WITH_GUIDES = new Set([
27025
+ "100" /* EXPRESSION_CHANGED_AFTER_CHECKED */,
27026
+ "200" /* CYCLIC_DI_DEPENDENCY */,
27027
+ "201" /* PROVIDER_NOT_FOUND */,
27028
+ "300" /* MULTIPLE_COMPONENTS_MATCH */,
27029
+ "301" /* EXPORT_NOT_FOUND */,
27030
+ "302" /* PIPE_NOT_FOUND */,
27031
+ ]);
27032
+ /* tslint:enable:no-toplevel-property-access */
27033
+ /** Called to format a runtime error */
27034
+ function formatRuntimeError(code, message) {
27035
+ const fullCode = code ? `NG0${code}: ` : '';
27036
+ let errorMessage = `${fullCode}${message}`;
27037
+ // Some runtime errors are still thrown without `ngDevMode` (for example
27038
+ // `throwProviderNotFoundError`), so we add `ngDevMode` check here to avoid pulling
27039
+ // `RUNTIME_ERRORS_WITH_GUIDES` symbol into prod bundles.
27040
+ // TODO: revisit all instances where `RuntimeError` is thrown and see if `ngDevMode` can be added
27041
+ // there instead to tree-shake more devmode-only code (and eventually remove `ngDevMode` check
27042
+ // from this code).
27043
+ if (ngDevMode && RUNTIME_ERRORS_WITH_GUIDES.has(code)) {
27044
+ errorMessage = `${errorMessage}. Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/NG0${code}`;
27045
+ }
27046
+ return errorMessage;
27047
+ }
27048
+
27049
+ /**
27050
+ * @license
27051
+ * Copyright Google LLC All Rights Reserved.
27052
+ *
27053
+ * Use of this source code is governed by an MIT-style license that can be
27054
+ * found in the LICENSE file at https://angular.io/license
27055
+ */
27056
+ /**
27057
+ * Used for stringify render output in Ivy.
27058
+ * Important! This function is very performance-sensitive and we should
27059
+ * be extra careful not to introduce megamorphic reads in it.
27060
+ * Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations.
27061
+ */
27062
+ function renderStringify(value) {
27063
+ if (typeof value === 'string')
27064
+ return value;
27065
+ if (value == null)
27066
+ return '';
27067
+ // Use `String` so that it invokes the `toString` method of the value. Note that this
27068
+ // appears to be faster than calling `value.toString` (see `render_stringify` benchmark).
27069
+ return String(value);
27070
+ }
27071
+ /**
27072
+ * Used to stringify a value so that it can be displayed in an error message.
27073
+ * Important! This function contains a megamorphic read and should only be
27074
+ * used for error messages.
27075
+ */
27076
+ function stringifyForError(value) {
27077
+ if (typeof value === 'function')
27078
+ return value.name || value.toString();
27079
+ if (typeof value === 'object' && value != null && typeof value.type === 'function') {
27080
+ return value.type.name || value.type.toString();
27081
+ }
27082
+ return renderStringify(value);
27083
+ }
27084
+
27085
+ /** Called when directives inject each other (creating a circular dependency) */
27086
+ function throwCyclicDependencyError(token, path) {
27087
+ const depPath = path ? `. Dependency path: ${path.join(' > ')} > ${token}` : '';
27088
+ throw new RuntimeError("200" /* CYCLIC_DI_DEPENDENCY */, `Circular dependency in DI detected for ${token}${depPath}`);
27089
+ }
27090
+ /** Throws an error when a token is not found in DI. */
27091
+ function throwProviderNotFoundError(token, injectorName) {
27092
+ const injectorDetails = injectorName ? ` in ${injectorName}` : '';
27093
+ throw new RuntimeError("201" /* PROVIDER_NOT_FOUND */, `No provider for ${stringifyForError(token)} found${injectorDetails}`);
27094
+ }
27095
+
27023
27096
  /**
27024
27097
  * @license
27025
27098
  * Copyright Google LLC All Rights Reserved.
@@ -27142,9 +27215,6 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
27142
27215
  *
27143
27216
  * Options:
27144
27217
  *
27145
- * * `factory`: an `InjectorType` is an instantiable type, so a zero argument `factory` function to
27146
- * create the type must be provided. If that factory function needs to inject arguments, it can
27147
- * use the `inject` function.
27148
27218
  * * `providers`: an optional array of providers to add to the injector. Each provider must
27149
27219
  * either have a factory or point to a type which has a `ɵprov` static property (the
27150
27220
  * type must be an `InjectableType`).
@@ -27155,11 +27225,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
27155
27225
  * @codeGenApi
27156
27226
  */
27157
27227
  function ɵɵdefineInjector(options) {
27158
- return {
27159
- factory: options.factory,
27160
- providers: options.providers || [],
27161
- imports: options.imports || [],
27162
- };
27228
+ return { providers: options.providers || [], imports: options.imports || [] };
27163
27229
  }
27164
27230
  /**
27165
27231
  * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading
@@ -27259,7 +27325,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
27259
27325
  return null;
27260
27326
  if (notFoundValue !== undefined)
27261
27327
  return notFoundValue;
27262
- throw new Error(`Injector: NOT_FOUND [${stringify$1(token)}]`);
27328
+ throwProviderNotFoundError(stringify$1(token), 'Injector');
27263
27329
  }
27264
27330
 
27265
27331
  /**
@@ -27781,98 +27847,6 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
27781
27847
  return hasFactoryDef ? type[NG_FACTORY_DEF] : null;
27782
27848
  }
27783
27849
 
27784
- /**
27785
- * @license
27786
- * Copyright Google LLC All Rights Reserved.
27787
- *
27788
- * Use of this source code is governed by an MIT-style license that can be
27789
- * found in the LICENSE file at https://angular.io/license
27790
- */
27791
- // Base URL for the error details page.
27792
- // Keep this value in sync with a similar const in
27793
- // `packages/compiler-cli/src/ngtsc/diagnostics/src/error_code.ts`.
27794
- const ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors';
27795
- class RuntimeError extends Error {
27796
- constructor(code, message) {
27797
- super(formatRuntimeError(code, message));
27798
- this.code = code;
27799
- }
27800
- }
27801
- // Contains a set of error messages that have details guides at angular.io.
27802
- // Full list of available error guides can be found at https://angular.io/errors
27803
- /* tslint:disable:no-toplevel-property-access */
27804
- const RUNTIME_ERRORS_WITH_GUIDES = new Set([
27805
- "100" /* EXPRESSION_CHANGED_AFTER_CHECKED */,
27806
- "200" /* CYCLIC_DI_DEPENDENCY */,
27807
- "201" /* PROVIDER_NOT_FOUND */,
27808
- "300" /* MULTIPLE_COMPONENTS_MATCH */,
27809
- "301" /* EXPORT_NOT_FOUND */,
27810
- "302" /* PIPE_NOT_FOUND */,
27811
- ]);
27812
- /* tslint:enable:no-toplevel-property-access */
27813
- /** Called to format a runtime error */
27814
- function formatRuntimeError(code, message) {
27815
- const fullCode = code ? `NG0${code}: ` : '';
27816
- let errorMessage = `${fullCode}${message}`;
27817
- // Some runtime errors are still thrown without `ngDevMode` (for example
27818
- // `throwProviderNotFoundError`), so we add `ngDevMode` check here to avoid pulling
27819
- // `RUNTIME_ERRORS_WITH_GUIDES` symbol into prod bundles.
27820
- // TODO: revisit all instances where `RuntimeError` is thrown and see if `ngDevMode` can be added
27821
- // there instead to tree-shake more devmode-only code (and eventually remove `ngDevMode` check
27822
- // from this code).
27823
- if (ngDevMode && RUNTIME_ERRORS_WITH_GUIDES.has(code)) {
27824
- errorMessage = `${errorMessage}. Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/NG0${code}`;
27825
- }
27826
- return errorMessage;
27827
- }
27828
-
27829
- /**
27830
- * @license
27831
- * Copyright Google LLC All Rights Reserved.
27832
- *
27833
- * Use of this source code is governed by an MIT-style license that can be
27834
- * found in the LICENSE file at https://angular.io/license
27835
- */
27836
- /**
27837
- * Used for stringify render output in Ivy.
27838
- * Important! This function is very performance-sensitive and we should
27839
- * be extra careful not to introduce megamorphic reads in it.
27840
- * Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations.
27841
- */
27842
- function renderStringify(value) {
27843
- if (typeof value === 'string')
27844
- return value;
27845
- if (value == null)
27846
- return '';
27847
- // Use `String` so that it invokes the `toString` method of the value. Note that this
27848
- // appears to be faster than calling `value.toString` (see `render_stringify` benchmark).
27849
- return String(value);
27850
- }
27851
- /**
27852
- * Used to stringify a value so that it can be displayed in an error message.
27853
- * Important! This function contains a megamorphic read and should only be
27854
- * used for error messages.
27855
- */
27856
- function stringifyForError(value) {
27857
- if (typeof value === 'function')
27858
- return value.name || value.toString();
27859
- if (typeof value === 'object' && value != null && typeof value.type === 'function') {
27860
- return value.type.name || value.type.toString();
27861
- }
27862
- return renderStringify(value);
27863
- }
27864
-
27865
- /** Called when directives inject each other (creating a circular dependency) */
27866
- function throwCyclicDependencyError(token, path) {
27867
- const depPath = path ? `. Dependency path: ${path.join(' > ')} > ${token}` : '';
27868
- throw new RuntimeError("200" /* CYCLIC_DI_DEPENDENCY */, `Circular dependency in DI detected for ${token}${depPath}`);
27869
- }
27870
- /** Throws an error when a token is not found in DI. */
27871
- function throwProviderNotFoundError(token, injectorName) {
27872
- const injectorDetails = injectorName ? ` in ${injectorName}` : '';
27873
- throw new RuntimeError("201" /* PROVIDER_NOT_FOUND */, `No provider for ${stringifyForError(token)} found${injectorDetails}`);
27874
- }
27875
-
27876
27850
  /**
27877
27851
  * @license
27878
27852
  * Copyright Google LLC All Rights Reserved.
@@ -31670,7 +31644,6 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
31670
31644
  }
31671
31645
  return embeddedArray;
31672
31646
  }
31673
- throw new Error('unreachable code');
31674
31647
  }
31675
31648
  function nameSuffix(text) {
31676
31649
  if (text == null)
@@ -35189,7 +35162,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
35189
35162
  /**
35190
35163
  * @publicApi
35191
35164
  */
35192
- const VERSION$2 = new Version$1('11.2.1');
35165
+ const VERSION$2 = new Version$1('11.2.5');
35193
35166
 
35194
35167
  /**
35195
35168
  * @license
@@ -38655,11 +38628,10 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
38655
38628
  if (metadata && metadata.exports) {
38656
38629
  imports = [...imports, metadata.exports];
38657
38630
  }
38658
- moduleType.ɵinj = ɵɵdefineInjector({
38659
- factory: convertInjectableProviderToFactory(moduleType, { useClass: moduleType }),
38660
- providers: metadata && metadata.providers,
38661
- imports: imports,
38662
- });
38631
+ const moduleInjectorType = moduleType;
38632
+ moduleInjectorType.ɵfac = convertInjectableProviderToFactory(moduleType, { useClass: moduleType });
38633
+ moduleInjectorType.ɵinj =
38634
+ ɵɵdefineInjector({ providers: metadata && metadata.providers, imports: imports });
38663
38635
  }
38664
38636
  const SWITCH_COMPILE_NGMODULE__PRE_R3__ = preR3NgModuleCompile;
38665
38637
  const SWITCH_COMPILE_NGMODULE = SWITCH_COMPILE_NGMODULE__PRE_R3__;
@@ -40162,9 +40134,8 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
40162
40134
  */
40163
40135
  class ApplicationRef {
40164
40136
  /** @internal */
40165
- constructor(_zone, _console, _injector, _exceptionHandler, _componentFactoryResolver, _initStatus) {
40137
+ constructor(_zone, _injector, _exceptionHandler, _componentFactoryResolver, _initStatus) {
40166
40138
  this._zone = _zone;
40167
- this._console = _console;
40168
40139
  this._injector = _injector;
40169
40140
  this._exceptionHandler = _exceptionHandler;
40170
40141
  this._componentFactoryResolver = _componentFactoryResolver;
@@ -40280,8 +40251,11 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
40280
40251
  }
40281
40252
  });
40282
40253
  this._loadComponent(compRef);
40283
- {
40284
- this._console.log(`Angular is running in development mode. Call enableProdMode() to enable production mode.`);
40254
+ // Note that we have still left the `isDevMode()` condition in order to avoid
40255
+ // creating a breaking change for projects that still use the View Engine.
40256
+ if ((typeof ngDevMode === 'undefined' || ngDevMode) && isDevMode()) {
40257
+ const _console = this._injector.get(Console);
40258
+ _console.log(`Angular is running in development mode. Call enableProdMode() to enable production mode.`);
40285
40259
  }
40286
40260
  return compRef;
40287
40261
  }
@@ -40363,7 +40337,6 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
40363
40337
  ];
40364
40338
  ApplicationRef.ctorParameters = () => [
40365
40339
  { type: NgZone },
40366
- { type: Console },
40367
40340
  { type: Injector },
40368
40341
  { type: ErrorHandler },
40369
40342
  { type: ComponentFactoryResolver },
@@ -40450,7 +40423,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
40450
40423
  {
40451
40424
  provide: ApplicationRef,
40452
40425
  useClass: ApplicationRef,
40453
- deps: [NgZone, Console, Injector, ErrorHandler, ComponentFactoryResolver, ApplicationInitStatus]
40426
+ deps: [NgZone, Injector, ErrorHandler, ComponentFactoryResolver, ApplicationInitStatus]
40454
40427
  },
40455
40428
  { provide: SCHEDULER, deps: [NgZone], useFactory: zoneSchedulerFactory },
40456
40429
  {
@@ -43003,6 +42976,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
43003
42976
 
43004
42977
  exports.create = create;
43005
42978
  exports.getExternalFiles = getExternalFiles;
42979
+ exports.isNgLanguageService = isNgLanguageService;
43006
42980
 
43007
42981
  Object.defineProperty(exports, '__esModule', { value: true });
43008
42982