@angular/language-service 10.1.4 → 10.2.1

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 v10.1.4
2
+ * @license Angular v10.2.1
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  * License: MIT
5
5
  */
@@ -8004,11 +8004,12 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
8004
8004
  function extractCommentsWithHash(input) {
8005
8005
  return input.match(_commentWithHashRe) || [];
8006
8006
  }
8007
- const _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
8008
- const _curlyRe = /([{}])/g;
8009
- const OPEN_CURLY = '{';
8010
- const CLOSE_CURLY = '}';
8011
8007
  const BLOCK_PLACEHOLDER = '%BLOCK%';
8008
+ const QUOTE_PLACEHOLDER = '%QUOTED%';
8009
+ const _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
8010
+ const _quotedRe = /%QUOTED%/g;
8011
+ const CONTENT_PAIRS = new Map([['{', '}']]);
8012
+ const QUOTE_PAIRS = new Map([[`"`, `"`], [`'`, `'`]]);
8012
8013
  class CssRule {
8013
8014
  constructor(selector, content) {
8014
8015
  this.selector = selector;
@@ -8016,9 +8017,12 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
8016
8017
  }
8017
8018
  }
8018
8019
  function processRules(input, ruleCallback) {
8019
- const inputWithEscapedBlocks = escapeBlocks(input);
8020
+ const inputWithEscapedQuotes = escapeBlocks(input, QUOTE_PAIRS, QUOTE_PLACEHOLDER);
8021
+ const inputWithEscapedBlocks = escapeBlocks(inputWithEscapedQuotes.escapedString, CONTENT_PAIRS, BLOCK_PLACEHOLDER);
8020
8022
  let nextBlockIndex = 0;
8021
- return inputWithEscapedBlocks.escapedString.replace(_ruleRe, function (...m) {
8023
+ let nextQuoteIndex = 0;
8024
+ return inputWithEscapedBlocks.escapedString
8025
+ .replace(_ruleRe, (...m) => {
8022
8026
  const selector = m[2];
8023
8027
  let content = '';
8024
8028
  let suffix = m[4];
@@ -8030,7 +8034,8 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
8030
8034
  }
8031
8035
  const rule = ruleCallback(new CssRule(selector, content));
8032
8036
  return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;
8033
- });
8037
+ })
8038
+ .replace(_quotedRe, () => inputWithEscapedQuotes.blocks[nextQuoteIndex++]);
8034
8039
  }
8035
8040
  class StringWithEscapedBlocks {
8036
8041
  constructor(escapedString, blocks) {
@@ -8038,35 +8043,46 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
8038
8043
  this.blocks = blocks;
8039
8044
  }
8040
8045
  }
8041
- function escapeBlocks(input) {
8042
- const inputParts = input.split(_curlyRe);
8046
+ function escapeBlocks(input, charPairs, placeholder) {
8043
8047
  const resultParts = [];
8044
8048
  const escapedBlocks = [];
8045
- let bracketCount = 0;
8046
- let currentBlockParts = [];
8047
- for (let partIndex = 0; partIndex < inputParts.length; partIndex++) {
8048
- const part = inputParts[partIndex];
8049
- if (part == CLOSE_CURLY) {
8050
- bracketCount--;
8051
- }
8052
- if (bracketCount > 0) {
8053
- currentBlockParts.push(part);
8049
+ let openCharCount = 0;
8050
+ let nonBlockStartIndex = 0;
8051
+ let blockStartIndex = -1;
8052
+ let openChar;
8053
+ let closeChar;
8054
+ for (let i = 0; i < input.length; i++) {
8055
+ const char = input[i];
8056
+ if (char === '\\') {
8057
+ i++;
8054
8058
  }
8055
- else {
8056
- if (currentBlockParts.length > 0) {
8057
- escapedBlocks.push(currentBlockParts.join(''));
8058
- resultParts.push(BLOCK_PLACEHOLDER);
8059
- currentBlockParts = [];
8059
+ else if (char === closeChar) {
8060
+ openCharCount--;
8061
+ if (openCharCount === 0) {
8062
+ escapedBlocks.push(input.substring(blockStartIndex, i));
8063
+ resultParts.push(placeholder);
8064
+ nonBlockStartIndex = i;
8065
+ blockStartIndex = -1;
8066
+ openChar = closeChar = undefined;
8060
8067
  }
8061
- resultParts.push(part);
8062
8068
  }
8063
- if (part == OPEN_CURLY) {
8064
- bracketCount++;
8069
+ else if (char === openChar) {
8070
+ openCharCount++;
8071
+ }
8072
+ else if (openCharCount === 0 && charPairs.has(char)) {
8073
+ openChar = char;
8074
+ closeChar = charPairs.get(char);
8075
+ openCharCount = 1;
8076
+ blockStartIndex = i + 1;
8077
+ resultParts.push(input.substring(nonBlockStartIndex, blockStartIndex));
8065
8078
  }
8066
8079
  }
8067
- if (currentBlockParts.length > 0) {
8068
- escapedBlocks.push(currentBlockParts.join(''));
8069
- resultParts.push(BLOCK_PLACEHOLDER);
8080
+ if (blockStartIndex !== -1) {
8081
+ escapedBlocks.push(input.substring(blockStartIndex));
8082
+ resultParts.push(placeholder);
8083
+ }
8084
+ else {
8085
+ resultParts.push(input.substring(nonBlockStartIndex));
8070
8086
  }
8071
8087
  return new StringWithEscapedBlocks(resultParts.join(''), escapedBlocks);
8072
8088
  }
@@ -12755,43 +12771,77 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
12755
12771
  const span = new ParseSpan(0, input == null ? 0 : input.length);
12756
12772
  return new ASTWithSource(new Interpolation(span, span.toAbsolute(absoluteOffset), split.strings, expressions), input, location, absoluteOffset, this.errors);
12757
12773
  }
12774
+ /**
12775
+ * Splits a string of text into "raw" text segments and expressions present in interpolations in
12776
+ * the string.
12777
+ * Returns `null` if there are no interpolations, otherwise a
12778
+ * `SplitInterpolation` with splits that look like
12779
+ * <raw text> <expression> <raw text> ... <raw text> <expression> <raw text>
12780
+ */
12758
12781
  splitInterpolation(input, location, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
12759
- const regexp = _getInterpolateRegExp(interpolationConfig);
12760
- const parts = input.split(regexp);
12761
- if (parts.length <= 1) {
12762
- return null;
12763
- }
12764
12782
  const strings = [];
12765
12783
  const expressions = [];
12766
12784
  const offsets = [];
12767
12785
  const stringSpans = [];
12768
12786
  const expressionSpans = [];
12769
- let offset = 0;
12770
- for (let i = 0; i < parts.length; i++) {
12771
- const part = parts[i];
12772
- if (i % 2 === 0) {
12773
- // fixed string
12787
+ let i = 0;
12788
+ let atInterpolation = false;
12789
+ let extendLastString = false;
12790
+ let { start: interpStart, end: interpEnd } = interpolationConfig;
12791
+ while (i < input.length) {
12792
+ if (!atInterpolation) {
12793
+ // parse until starting {{
12794
+ const start = i;
12795
+ i = input.indexOf(interpStart, i);
12796
+ if (i === -1) {
12797
+ i = input.length;
12798
+ }
12799
+ const part = input.substring(start, i);
12774
12800
  strings.push(part);
12775
- const start = offset;
12776
- offset += part.length;
12777
- stringSpans.push({ start, end: offset });
12778
- }
12779
- else if (part.trim().length > 0) {
12780
- const start = offset;
12781
- offset += interpolationConfig.start.length;
12782
- expressions.push(part);
12783
- offsets.push(offset);
12784
- offset += part.length + interpolationConfig.end.length;
12785
- expressionSpans.push({ start, end: offset });
12801
+ stringSpans.push({ start, end: i });
12802
+ atInterpolation = true;
12803
+ }
12804
+ else {
12805
+ // parse from starting {{ to ending }}
12806
+ const fullStart = i;
12807
+ const exprStart = fullStart + interpStart.length;
12808
+ const exprEnd = input.indexOf(interpEnd, exprStart);
12809
+ if (exprEnd === -1) {
12810
+ // Could not find the end of the interpolation; do not parse an expression.
12811
+ // Instead we should extend the content on the last raw string.
12812
+ atInterpolation = false;
12813
+ extendLastString = true;
12814
+ break;
12815
+ }
12816
+ const fullEnd = exprEnd + interpEnd.length;
12817
+ const part = input.substring(exprStart, exprEnd);
12818
+ if (part.trim().length > 0) {
12819
+ expressions.push(part);
12820
+ }
12821
+ else {
12822
+ this._reportError('Blank expressions are not allowed in interpolated strings', input, `at column ${i} in`, location);
12823
+ expressions.push('$implicit');
12824
+ }
12825
+ offsets.push(exprStart);
12826
+ expressionSpans.push({ start: fullStart, end: fullEnd });
12827
+ i = fullEnd;
12828
+ atInterpolation = false;
12829
+ }
12830
+ }
12831
+ if (!atInterpolation) {
12832
+ // If we are now at a text section, add the remaining content as a raw string.
12833
+ if (extendLastString) {
12834
+ strings[strings.length - 1] += input.substring(i);
12835
+ stringSpans[stringSpans.length - 1].end = input.length;
12786
12836
  }
12787
12837
  else {
12788
- this._reportError('Blank expressions are not allowed in interpolated strings', input, `at column ${this._findInterpolationErrorColumn(parts, i, interpolationConfig)} in`, location);
12789
- expressions.push('$implicit');
12790
- offsets.push(offset);
12791
- expressionSpans.push({ start: offset, end: offset });
12838
+ strings.push(input.substring(i));
12839
+ stringSpans.push({ start: i, end: input.length });
12792
12840
  }
12793
12841
  }
12794
- return new SplitInterpolation(strings, stringSpans, expressions, expressionSpans, offsets);
12842
+ return expressions.length === 0 ?
12843
+ null :
12844
+ new SplitInterpolation(strings, stringSpans, expressions, expressionSpans, offsets);
12795
12845
  }
12796
12846
  wrapLiteralPrimitive(input, location, absoluteOffset) {
12797
12847
  const span = new ParseSpan(0, input == null ? 0 : input.length);
@@ -12840,6 +12890,19 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
12840
12890
  this.simpleExpressionChecker = IvySimpleExpressionChecker; //
12841
12891
  }
12842
12892
  }
12893
+ /** Describes a stateful context an expression parser is in. */
12894
+ var ParseContextFlags;
12895
+ (function (ParseContextFlags) {
12896
+ ParseContextFlags[ParseContextFlags["None"] = 0] = "None";
12897
+ /**
12898
+ * A Writable context is one in which a value may be written to an lvalue.
12899
+ * For example, after we see a property access, we may expect a write to the
12900
+ * property via the "=" operator.
12901
+ * prop
12902
+ * ^ possible "=" after
12903
+ */
12904
+ ParseContextFlags[ParseContextFlags["Writable"] = 1] = "Writable";
12905
+ })(ParseContextFlags || (ParseContextFlags = {}));
12843
12906
  class _ParseAST {
12844
12907
  constructor(input, location, absoluteOffset, tokens, inputLength, parseAction, errors, offset) {
12845
12908
  this.input = input;
@@ -12853,6 +12916,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
12853
12916
  this.rparensExpected = 0;
12854
12917
  this.rbracketsExpected = 0;
12855
12918
  this.rbracesExpected = 0;
12919
+ this.context = ParseContextFlags.None;
12856
12920
  // Cache of expression start and input indeces to the absolute source span they map to, used to
12857
12921
  // prevent creating superfluous source spans in `sourceSpan`.
12858
12922
  // A serial of the expression start and input index is used for mapping because both are stateful
@@ -12913,6 +12977,15 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
12913
12977
  advance() {
12914
12978
  this.index++;
12915
12979
  }
12980
+ /**
12981
+ * Executes a callback in the provided context.
12982
+ */
12983
+ withContext(context, cb) {
12984
+ this.context |= context;
12985
+ const ret = cb();
12986
+ this.context ^= context;
12987
+ return ret;
12988
+ }
12916
12989
  consumeOptionalCharacter(code) {
12917
12990
  if (this.next.isCharacter(code)) {
12918
12991
  this.advance();
@@ -12928,6 +13001,12 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
12928
13001
  peekKeywordAs() {
12929
13002
  return this.next.isKeywordAs();
12930
13003
  }
13004
+ /**
13005
+ * Consumes an expected character, otherwise emits an error about the missing expected character
13006
+ * and skips over the token stream until reaching a recoverable point.
13007
+ *
13008
+ * See `this.error` and `this.skip` for more details.
13009
+ */
12931
13010
  expectCharacter(code) {
12932
13011
  if (this.consumeOptionalCharacter(code))
12933
13012
  return;
@@ -12947,10 +13026,13 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
12947
13026
  return;
12948
13027
  this.error(`Missing expected operator ${operator}`);
12949
13028
  }
13029
+ prettyPrintToken(tok) {
13030
+ return tok === EOF ? 'end of input' : `token ${tok}`;
13031
+ }
12950
13032
  expectIdentifierOrKeyword() {
12951
13033
  const n = this.next;
12952
13034
  if (!n.isIdentifier() && !n.isKeyword()) {
12953
- this.error(`Unexpected token ${n}, expected identifier or keyword`);
13035
+ this.error(`Unexpected ${this.prettyPrintToken(n)}, expected identifier or keyword`);
12954
13036
  return '';
12955
13037
  }
12956
13038
  this.advance();
@@ -12959,7 +13041,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
12959
13041
  expectIdentifierOrKeywordOrString() {
12960
13042
  const n = this.next;
12961
13043
  if (!n.isIdentifier() && !n.isKeyword() && !n.isString()) {
12962
- this.error(`Unexpected token ${n}, expected identifier, keyword, or string`);
13044
+ this.error(`Unexpected ${this.prettyPrintToken(n)}, expected identifier, keyword, or string`);
12963
13045
  return '';
12964
13046
  }
12965
13047
  this.advance();
@@ -13163,17 +13245,23 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
13163
13245
  result = this.parseAccessMemberOrMethodCall(result, true);
13164
13246
  }
13165
13247
  else if (this.consumeOptionalCharacter($LBRACKET)) {
13166
- this.rbracketsExpected++;
13167
- const key = this.parsePipe();
13168
- this.rbracketsExpected--;
13169
- this.expectCharacter($RBRACKET);
13170
- if (this.consumeOptionalOperator('=')) {
13171
- const value = this.parseConditional();
13172
- result = new KeyedWrite(this.span(resultStart), this.sourceSpan(resultStart), result, key, value);
13173
- }
13174
- else {
13175
- result = new KeyedRead(this.span(resultStart), this.sourceSpan(resultStart), result, key);
13176
- }
13248
+ this.withContext(ParseContextFlags.Writable, () => {
13249
+ this.rbracketsExpected++;
13250
+ const key = this.parsePipe();
13251
+ if (key instanceof EmptyExpr) {
13252
+ this.error(`Key access cannot be empty`);
13253
+ }
13254
+ this.rbracketsExpected--;
13255
+ this.expectCharacter($RBRACKET);
13256
+ if (this.consumeOptionalOperator('=')) {
13257
+ const value = this.parseConditional();
13258
+ result = new KeyedWrite(this.span(resultStart), this.sourceSpan(resultStart), result, key, value);
13259
+ }
13260
+ else {
13261
+ result =
13262
+ new KeyedRead(this.span(resultStart), this.sourceSpan(resultStart), result, key);
13263
+ }
13264
+ });
13177
13265
  }
13178
13266
  else if (this.consumeOptionalCharacter($LPAREN)) {
13179
13267
  this.rparensExpected++;
@@ -13512,6 +13600,10 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
13512
13600
  consumeStatementTerminator() {
13513
13601
  this.consumeOptionalCharacter($SEMICOLON) || this.consumeOptionalCharacter($COMMA);
13514
13602
  }
13603
+ /**
13604
+ * Records an error and skips over the token stream until reaching a recoverable point. See
13605
+ * `this.skip` for more details on token skipping.
13606
+ */
13515
13607
  error(message, index = null) {
13516
13608
  this.errors.push(new ParserError(message, this.input, this.locationText(index), this.location));
13517
13609
  this.skip();
@@ -13522,24 +13614,32 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
13522
13614
  return (index < this.tokens.length) ? `at column ${this.tokens[index].index + 1} in` :
13523
13615
  `at the end of the expression`;
13524
13616
  }
13525
- // Error recovery should skip tokens until it encounters a recovery point. skip() treats
13526
- // the end of input and a ';' as unconditionally a recovery point. It also treats ')',
13527
- // '}' and ']' as conditional recovery points if one of calling productions is expecting
13528
- // one of these symbols. This allows skip() to recover from errors such as '(a.) + 1' allowing
13529
- // more of the AST to be retained (it doesn't skip any tokens as the ')' is retained because
13530
- // of the '(' begins an '(' <expr> ')' production). The recovery points of grouping symbols
13531
- // must be conditional as they must be skipped if none of the calling productions are not
13532
- // expecting the closing token else we will never make progress in the case of an
13533
- // extraneous group closing symbol (such as a stray ')'). This is not the case for ';' because
13534
- // parseChain() is always the root production and it expects a ';'.
13535
- // If a production expects one of these token it increments the corresponding nesting count,
13536
- // and then decrements it just prior to checking if the token is in the input.
13617
+ /**
13618
+ * Error recovery should skip tokens until it encounters a recovery point. skip() treats
13619
+ * the end of input and a ';' as unconditionally a recovery point. It also treats ')',
13620
+ * '}' and ']' as conditional recovery points if one of calling productions is expecting
13621
+ * one of these symbols. This allows skip() to recover from errors such as '(a.) + 1' allowing
13622
+ * more of the AST to be retained (it doesn't skip any tokens as the ')' is retained because
13623
+ * of the '(' begins an '(' <expr> ')' production). The recovery points of grouping symbols
13624
+ * must be conditional as they must be skipped if none of the calling productions are not
13625
+ * expecting the closing token else we will never make progress in the case of an
13626
+ * extraneous group closing symbol (such as a stray ')'). This is not the case for ';' because
13627
+ * parseChain() is always the root production and it expects a ';'.
13628
+ *
13629
+ * Furthermore, the presence of a stateful context can add more recovery points.
13630
+ * - in a `Writable` context, we are able to recover after seeing the `=` operator, which
13631
+ * signals the presence of an independent rvalue expression following the `=` operator.
13632
+ *
13633
+ * If a production expects one of these token it increments the corresponding nesting count,
13634
+ * and then decrements it just prior to checking if the token is in the input.
13635
+ */
13537
13636
  skip() {
13538
13637
  let n = this.next;
13539
13638
  while (this.index < this.tokens.length && !n.isCharacter($SEMICOLON) &&
13540
13639
  (this.rparensExpected <= 0 || !n.isCharacter($RPAREN)) &&
13541
13640
  (this.rbracesExpected <= 0 || !n.isCharacter($RBRACE)) &&
13542
- (this.rbracketsExpected <= 0 || !n.isCharacter($RBRACKET))) {
13641
+ (this.rbracketsExpected <= 0 || !n.isCharacter($RBRACKET)) &&
13642
+ (!(this.context & ParseContextFlags.Writable) || !n.isOperator('='))) {
13543
13643
  if (this.next.isError()) {
13544
13644
  this.errors.push(new ParserError(this.next.toString(), this.input, this.locationText(), this.location));
13545
13645
  }
@@ -17863,7 +17963,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
17863
17963
  * Use of this source code is governed by an MIT-style license that can be
17864
17964
  * found in the LICENSE file at https://angular.io/license
17865
17965
  */
17866
- const VERSION$1 = new Version('10.1.4');
17966
+ const VERSION$1 = new Version('10.2.1');
17867
17967
 
17868
17968
  /**
17869
17969
  * @license
@@ -26448,7 +26548,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
26448
26548
  if (typeof ngDevMode !== 'object') {
26449
26549
  ngDevModeResetPerfCounters();
26450
26550
  }
26451
- return !!ngDevMode;
26551
+ return typeof ngDevMode !== 'undefined' && !!ngDevMode;
26452
26552
  }
26453
26553
  return false;
26454
26554
  }
@@ -27145,6 +27245,56 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
27145
27245
  assertNumber(lView[injectorIndex + 8 /* PARENT */], 'injectorIndex should point to parent injector');
27146
27246
  }
27147
27247
 
27248
+ /**
27249
+ * @license
27250
+ * Copyright Google LLC All Rights Reserved.
27251
+ *
27252
+ * Use of this source code is governed by an MIT-style license that can be
27253
+ * found in the LICENSE file at https://angular.io/license
27254
+ */
27255
+ /**
27256
+ * Used for stringify render output in Ivy.
27257
+ * Important! This function is very performance-sensitive and we should
27258
+ * be extra careful not to introduce megamorphic reads in it.
27259
+ */
27260
+ function renderStringify(value) {
27261
+ if (typeof value === 'string')
27262
+ return value;
27263
+ if (value == null)
27264
+ return '';
27265
+ return '' + value;
27266
+ }
27267
+ /**
27268
+ * Used to stringify a value so that it can be displayed in an error message.
27269
+ * Important! This function contains a megamorphic read and should only be
27270
+ * used for error messages.
27271
+ */
27272
+ function stringifyForError(value) {
27273
+ if (typeof value === 'function')
27274
+ return value.name || value.toString();
27275
+ if (typeof value === 'object' && value != null && typeof value.type === 'function') {
27276
+ return value.type.name || value.type.toString();
27277
+ }
27278
+ return renderStringify(value);
27279
+ }
27280
+ const ɵ0$2 = () => (typeof requestAnimationFrame !== 'undefined' &&
27281
+ requestAnimationFrame || // browser only
27282
+ setTimeout // everything else
27283
+ )
27284
+ .bind(_global$1);
27285
+ const defaultScheduler = (ɵ0$2)();
27286
+
27287
+ /** Called when directives inject each other (creating a circular dependency) */
27288
+ function throwCyclicDependencyError(token, path) {
27289
+ const depPath = path ? `. Dependency path: ${path.join(' > ')} > ${token}` : '';
27290
+ throw new Error(`Circular dependency in DI detected for ${token}${depPath}`);
27291
+ }
27292
+ /** Throws an error when a token is not found in DI. */
27293
+ function throwProviderNotFoundError(token, injectorName) {
27294
+ const injectorDetails = injectorName ? ` in ${injectorName}` : '';
27295
+ throw new Error(`No provider for ${stringifyForError(token)} found${injectorDetails}`);
27296
+ }
27297
+
27148
27298
  /**
27149
27299
  * @license
27150
27300
  * Copyright Google LLC All Rights Reserved.
@@ -27299,11 +27449,11 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
27299
27449
  function isProceduralRenderer(renderer) {
27300
27450
  return !!(renderer.listen);
27301
27451
  }
27302
- const ɵ0$2 = (hostElement, rendererType) => {
27452
+ const ɵ0$3 = (hostElement, rendererType) => {
27303
27453
  return getDocument();
27304
27454
  };
27305
27455
  const domRendererFactory3 = {
27306
- createRenderer: ɵ0$2
27456
+ createRenderer: ɵ0$3
27307
27457
  };
27308
27458
 
27309
27459
  /**
@@ -27431,7 +27581,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
27431
27581
  const instructionState = {
27432
27582
  lFrame: createLFrame(null),
27433
27583
  bindingsEnabled: true,
27434
- checkNoChangesMode: false,
27584
+ isInCheckNoChangesMode: false,
27435
27585
  };
27436
27586
  /**
27437
27587
  * Return the current `TView`.
@@ -27450,12 +27600,12 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
27450
27600
  function isCurrentTNodeParent() {
27451
27601
  return instructionState.lFrame.isParent;
27452
27602
  }
27453
- function getCheckNoChangesMode() {
27603
+ function isInCheckNoChangesMode() {
27454
27604
  // TODO(misko): remove this from the LView since it is ngDevMode=true mode only.
27455
- return instructionState.checkNoChangesMode;
27605
+ return instructionState.isInCheckNoChangesMode;
27456
27606
  }
27457
- function setCheckNoChangesMode(mode) {
27458
- instructionState.checkNoChangesMode = mode;
27607
+ function setIsInCheckNoChangesMode(mode) {
27608
+ instructionState.isInCheckNoChangesMode = mode;
27459
27609
  }
27460
27610
  function setBindingIndex(value) {
27461
27611
  return instructionState.lFrame.bindingIndex = value;
@@ -27791,7 +27941,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
27791
27941
  */
27792
27942
  function callHooks(currentView, arr, initPhase, currentNodeIndex) {
27793
27943
  ngDevMode &&
27794
- assertEqual(getCheckNoChangesMode(), false, 'Hooks should never be run in the check no changes mode.');
27944
+ assertEqual(isInCheckNoChangesMode(), false, 'Hooks should never be run when in check no changes mode.');
27795
27945
  const startIndex = currentNodeIndex !== undefined ?
27796
27946
  (currentView[PREORDER_HOOK_FLAGS] & 65535 /* IndexOfTheNextPreOrderHookMaskMask */) :
27797
27947
  0;
@@ -28130,45 +28280,6 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
28130
28280
  return parentView;
28131
28281
  }
28132
28282
 
28133
- /**
28134
- * @license
28135
- * Copyright Google LLC All Rights Reserved.
28136
- *
28137
- * Use of this source code is governed by an MIT-style license that can be
28138
- * found in the LICENSE file at https://angular.io/license
28139
- */
28140
- /**
28141
- * Used for stringify render output in Ivy.
28142
- * Important! This function is very performance-sensitive and we should
28143
- * be extra careful not to introduce megamorphic reads in it.
28144
- */
28145
- function renderStringify(value) {
28146
- if (typeof value === 'string')
28147
- return value;
28148
- if (value == null)
28149
- return '';
28150
- return '' + value;
28151
- }
28152
- /**
28153
- * Used to stringify a value so that it can be displayed in an error message.
28154
- * Important! This function contains a megamorphic read and should only be
28155
- * used for error messages.
28156
- */
28157
- function stringifyForError(value) {
28158
- if (typeof value === 'function')
28159
- return value.name || value.toString();
28160
- if (typeof value === 'object' && value != null && typeof value.type === 'function') {
28161
- return value.type.name || value.type.toString();
28162
- }
28163
- return renderStringify(value);
28164
- }
28165
- const ɵ0$3 = () => (typeof requestAnimationFrame !== 'undefined' &&
28166
- requestAnimationFrame || // browser only
28167
- setTimeout // everything else
28168
- )
28169
- .bind(_global$1);
28170
- const defaultScheduler = (ɵ0$3)();
28171
-
28172
28283
  /**
28173
28284
  * @license
28174
28285
  * Copyright Google LLC All Rights Reserved.
@@ -28418,7 +28529,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
28418
28529
  try {
28419
28530
  const value = bloomHash();
28420
28531
  if (value == null && !(flags & InjectFlags.Optional)) {
28421
- throw new Error(`No provider for ${stringifyForError(token)}!`);
28532
+ throwProviderNotFoundError(token);
28422
28533
  }
28423
28534
  else {
28424
28535
  return value;
@@ -28517,7 +28628,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
28517
28628
  return notFoundValue;
28518
28629
  }
28519
28630
  else {
28520
- throw new Error(`NodeInjector: NOT_FOUND [${stringifyForError(token)}]`);
28631
+ throwProviderNotFoundError(token, 'NodeInjector');
28521
28632
  }
28522
28633
  }
28523
28634
  const NOT_FOUND = {};
@@ -28601,7 +28712,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
28601
28712
  if (isFactory(value)) {
28602
28713
  const factory = value;
28603
28714
  if (factory.resolving) {
28604
- throw new Error(`Circular dep for ${stringifyForError(tData[index])}`);
28715
+ throwCyclicDependencyError(stringifyForError(tData[index]));
28605
28716
  }
28606
28717
  const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);
28607
28718
  factory.resolving = true;
@@ -30095,7 +30206,9 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
30095
30206
  if ((flags & 256 /* Destroyed */) === 256 /* Destroyed */)
30096
30207
  return;
30097
30208
  enterView(lView);
30098
- const checkNoChangesMode = getCheckNoChangesMode();
30209
+ // Check no changes mode is a dev only mode used to verify that bindings have not changed
30210
+ // since they were assigned. We do not want to execute lifecycle hooks in that mode.
30211
+ const isInCheckNoChangesPass = isInCheckNoChangesMode();
30099
30212
  try {
30100
30213
  resetPreOrderHookFlags(lView);
30101
30214
  setBindingIndex(tView.bindingStartIndex);
@@ -30105,7 +30218,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
30105
30218
  const hooksInitPhaseCompleted = (flags & 3 /* InitPhaseStateMask */) === 3 /* InitPhaseCompleted */;
30106
30219
  // execute pre-order hooks (OnInit, OnChanges, DoCheck)
30107
30220
  // PERF WARNING: do NOT extract this to a separate function without running benchmarks
30108
- if (!checkNoChangesMode) {
30221
+ if (!isInCheckNoChangesPass) {
30109
30222
  if (hooksInitPhaseCompleted) {
30110
30223
  const preOrderCheckHooks = tView.preOrderCheckHooks;
30111
30224
  if (preOrderCheckHooks !== null) {
@@ -30131,7 +30244,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
30131
30244
  }
30132
30245
  // execute content hooks (AfterContentInit, AfterContentChecked)
30133
30246
  // PERF WARNING: do NOT extract this to a separate function without running benchmarks
30134
- if (!checkNoChangesMode) {
30247
+ if (!isInCheckNoChangesPass) {
30135
30248
  if (hooksInitPhaseCompleted) {
30136
30249
  const contentCheckHooks = tView.contentCheckHooks;
30137
30250
  if (contentCheckHooks !== null) {
@@ -30161,7 +30274,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
30161
30274
  }
30162
30275
  // execute view hooks (AfterViewInit, AfterViewChecked)
30163
30276
  // PERF WARNING: do NOT extract this to a separate function without running benchmarks
30164
- if (!checkNoChangesMode) {
30277
+ if (!isInCheckNoChangesPass) {
30165
30278
  if (hooksInitPhaseCompleted) {
30166
30279
  const viewCheckHooks = tView.viewCheckHooks;
30167
30280
  if (viewCheckHooks !== null) {
@@ -30191,7 +30304,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
30191
30304
  // refresh a `NgClass` binding should work. If we would reset the dirty state in the check
30192
30305
  // no changes cycle, the component would be not be dirty for the next update pass. This would
30193
30306
  // be different in production mode where the component dirty state is not reset.
30194
- if (!checkNoChangesMode) {
30307
+ if (!isInCheckNoChangesPass) {
30195
30308
  lView[FLAGS] &= ~(64 /* Dirty */ | 8 /* FirstLViewPass */);
30196
30309
  }
30197
30310
  if (lView[FLAGS] & 1024 /* RefreshTransplantedView */) {
@@ -30205,7 +30318,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
30205
30318
  }
30206
30319
  function renderComponentOrTemplate(tView, lView, templateFn, context) {
30207
30320
  const rendererFactory = lView[RENDERER_FACTORY];
30208
- const normalExecutionPath = !getCheckNoChangesMode();
30321
+ const normalExecutionPath = !isInCheckNoChangesMode();
30209
30322
  const creationModeIsActive = isCreationMode(lView);
30210
30323
  try {
30211
30324
  if (normalExecutionPath && !creationModeIsActive && rendererFactory.begin) {
@@ -30229,7 +30342,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
30229
30342
  if (rf & 2 /* Update */ && lView.length > HEADER_OFFSET) {
30230
30343
  // When we're updating, inherently select 0 so we don't
30231
30344
  // have to generate that instruction for most update blocks.
30232
- selectIndexInternal(tView, lView, 0, getCheckNoChangesMode());
30345
+ selectIndexInternal(tView, lView, 0, isInCheckNoChangesMode());
30233
30346
  }
30234
30347
  templateFn(rf, context);
30235
30348
  }
@@ -30837,12 +30950,12 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
30837
30950
  tickRootContext(lView[CONTEXT]);
30838
30951
  }
30839
30952
  function checkNoChangesInternal(tView, view, context) {
30840
- setCheckNoChangesMode(true);
30953
+ setIsInCheckNoChangesMode(true);
30841
30954
  try {
30842
30955
  detectChangesInternal(tView, view, context);
30843
30956
  }
30844
30957
  finally {
30845
- setCheckNoChangesMode(false);
30958
+ setIsInCheckNoChangesMode(false);
30846
30959
  }
30847
30960
  }
30848
30961
  /**
@@ -30855,12 +30968,12 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
30855
30968
  * @param lView The view which the change detection should be checked on.
30856
30969
  */
30857
30970
  function checkNoChangesInRootView(lView) {
30858
- setCheckNoChangesMode(true);
30971
+ setIsInCheckNoChangesMode(true);
30859
30972
  try {
30860
30973
  detectChangesInRootView(lView);
30861
30974
  }
30862
30975
  finally {
30863
- setCheckNoChangesMode(false);
30976
+ setIsInCheckNoChangesMode(false);
30864
30977
  }
30865
30978
  }
30866
30979
  function executeViewQueryFn(flags, viewQueryFn, component) {
@@ -33676,6 +33789,110 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
33676
33789
  Object.freeze(EMPTY_ARRAY$2);
33677
33790
  }
33678
33791
 
33792
+ /**
33793
+ * @license
33794
+ * Copyright Google LLC All Rights Reserved.
33795
+ *
33796
+ * Use of this source code is governed by an MIT-style license that can be
33797
+ * found in the LICENSE file at https://angular.io/license
33798
+ */
33799
+ /**
33800
+ * NOTE: changes to the `ngI18nClosureMode` name must be synced with `compiler-cli/src/tooling.ts`.
33801
+ */
33802
+ if (typeof ngI18nClosureMode === 'undefined') {
33803
+ // These property accesses can be ignored because ngI18nClosureMode will be set to false
33804
+ // when optimizing code and the whole if statement will be dropped.
33805
+ // Make sure to refer to ngI18nClosureMode as ['ngI18nClosureMode'] for closure.
33806
+ // NOTE: we need to have it in IIFE so that the tree-shaker is happy.
33807
+ (function () {
33808
+ // tslint:disable-next-line:no-toplevel-property-access
33809
+ _global$1['ngI18nClosureMode'] =
33810
+ // TODO(FW-1250): validate that this actually, you know, works.
33811
+ // tslint:disable-next-line:no-toplevel-property-access
33812
+ typeof goog !== 'undefined' && typeof goog.getMsg === 'function';
33813
+ })();
33814
+ }
33815
+
33816
+ /**
33817
+ * @license
33818
+ * Copyright Google LLC All Rights Reserved.
33819
+ *
33820
+ * Use of this source code is governed by an MIT-style license that can be
33821
+ * found in the LICENSE file at https://angular.io/license
33822
+ */
33823
+ /**
33824
+ * Index of each type of locale data from the locale data array
33825
+ */
33826
+ var LocaleDataIndex;
33827
+ (function (LocaleDataIndex) {
33828
+ LocaleDataIndex[LocaleDataIndex["LocaleId"] = 0] = "LocaleId";
33829
+ LocaleDataIndex[LocaleDataIndex["DayPeriodsFormat"] = 1] = "DayPeriodsFormat";
33830
+ LocaleDataIndex[LocaleDataIndex["DayPeriodsStandalone"] = 2] = "DayPeriodsStandalone";
33831
+ LocaleDataIndex[LocaleDataIndex["DaysFormat"] = 3] = "DaysFormat";
33832
+ LocaleDataIndex[LocaleDataIndex["DaysStandalone"] = 4] = "DaysStandalone";
33833
+ LocaleDataIndex[LocaleDataIndex["MonthsFormat"] = 5] = "MonthsFormat";
33834
+ LocaleDataIndex[LocaleDataIndex["MonthsStandalone"] = 6] = "MonthsStandalone";
33835
+ LocaleDataIndex[LocaleDataIndex["Eras"] = 7] = "Eras";
33836
+ LocaleDataIndex[LocaleDataIndex["FirstDayOfWeek"] = 8] = "FirstDayOfWeek";
33837
+ LocaleDataIndex[LocaleDataIndex["WeekendRange"] = 9] = "WeekendRange";
33838
+ LocaleDataIndex[LocaleDataIndex["DateFormat"] = 10] = "DateFormat";
33839
+ LocaleDataIndex[LocaleDataIndex["TimeFormat"] = 11] = "TimeFormat";
33840
+ LocaleDataIndex[LocaleDataIndex["DateTimeFormat"] = 12] = "DateTimeFormat";
33841
+ LocaleDataIndex[LocaleDataIndex["NumberSymbols"] = 13] = "NumberSymbols";
33842
+ LocaleDataIndex[LocaleDataIndex["NumberFormats"] = 14] = "NumberFormats";
33843
+ LocaleDataIndex[LocaleDataIndex["CurrencyCode"] = 15] = "CurrencyCode";
33844
+ LocaleDataIndex[LocaleDataIndex["CurrencySymbol"] = 16] = "CurrencySymbol";
33845
+ LocaleDataIndex[LocaleDataIndex["CurrencyName"] = 17] = "CurrencyName";
33846
+ LocaleDataIndex[LocaleDataIndex["Currencies"] = 18] = "Currencies";
33847
+ LocaleDataIndex[LocaleDataIndex["Directionality"] = 19] = "Directionality";
33848
+ LocaleDataIndex[LocaleDataIndex["PluralCase"] = 20] = "PluralCase";
33849
+ LocaleDataIndex[LocaleDataIndex["ExtraData"] = 21] = "ExtraData";
33850
+ })(LocaleDataIndex || (LocaleDataIndex = {}));
33851
+
33852
+ /**
33853
+ * @license
33854
+ * Copyright Google LLC All Rights Reserved.
33855
+ *
33856
+ * Use of this source code is governed by an MIT-style license that can be
33857
+ * found in the LICENSE file at https://angular.io/license
33858
+ */
33859
+ /**
33860
+ * The locale id that the application is using by default (for translations and ICU expressions).
33861
+ */
33862
+ const DEFAULT_LOCALE_ID = 'en-US';
33863
+ /**
33864
+ * USD currency code that the application uses by default for CurrencyPipe when no
33865
+ * DEFAULT_CURRENCY_CODE is provided.
33866
+ */
33867
+ const USD_CURRENCY_CODE = 'USD';
33868
+
33869
+ /**
33870
+ * @license
33871
+ * Copyright Google LLC All Rights Reserved.
33872
+ *
33873
+ * Use of this source code is governed by an MIT-style license that can be
33874
+ * found in the LICENSE file at https://angular.io/license
33875
+ */
33876
+ /**
33877
+ * The locale id that the application is currently using (for translations and ICU expressions).
33878
+ * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine
33879
+ * but is now defined as a global value.
33880
+ */
33881
+ let LOCALE_ID = DEFAULT_LOCALE_ID;
33882
+ /**
33883
+ * Sets the locale id that will be used for translations and ICU expressions.
33884
+ * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine
33885
+ * but is now defined as a global value.
33886
+ *
33887
+ * @param localeId
33888
+ */
33889
+ function setLocaleId(localeId) {
33890
+ assertDefined(localeId, `Expected localeId to be defined`);
33891
+ if (typeof localeId === 'string') {
33892
+ LOCALE_ID = localeId.toLowerCase().replace(/_/g, '-');
33893
+ }
33894
+ }
33895
+
33679
33896
  /**
33680
33897
  * @license
33681
33898
  * Copyright Google LLC All Rights Reserved.
@@ -33898,7 +34115,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
33898
34115
  /**
33899
34116
  * @publicApi
33900
34117
  */
33901
- const VERSION$2 = new Version$1('10.1.4');
34118
+ const VERSION$2 = new Version$1('10.2.1');
33902
34119
 
33903
34120
  /**
33904
34121
  * @license
@@ -35303,110 +35520,6 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
35303
35520
  }
35304
35521
  }
35305
35522
 
35306
- /**
35307
- * @license
35308
- * Copyright Google LLC All Rights Reserved.
35309
- *
35310
- * Use of this source code is governed by an MIT-style license that can be
35311
- * found in the LICENSE file at https://angular.io/license
35312
- */
35313
- /**
35314
- * Index of each type of locale data from the locale data array
35315
- */
35316
- var LocaleDataIndex;
35317
- (function (LocaleDataIndex) {
35318
- LocaleDataIndex[LocaleDataIndex["LocaleId"] = 0] = "LocaleId";
35319
- LocaleDataIndex[LocaleDataIndex["DayPeriodsFormat"] = 1] = "DayPeriodsFormat";
35320
- LocaleDataIndex[LocaleDataIndex["DayPeriodsStandalone"] = 2] = "DayPeriodsStandalone";
35321
- LocaleDataIndex[LocaleDataIndex["DaysFormat"] = 3] = "DaysFormat";
35322
- LocaleDataIndex[LocaleDataIndex["DaysStandalone"] = 4] = "DaysStandalone";
35323
- LocaleDataIndex[LocaleDataIndex["MonthsFormat"] = 5] = "MonthsFormat";
35324
- LocaleDataIndex[LocaleDataIndex["MonthsStandalone"] = 6] = "MonthsStandalone";
35325
- LocaleDataIndex[LocaleDataIndex["Eras"] = 7] = "Eras";
35326
- LocaleDataIndex[LocaleDataIndex["FirstDayOfWeek"] = 8] = "FirstDayOfWeek";
35327
- LocaleDataIndex[LocaleDataIndex["WeekendRange"] = 9] = "WeekendRange";
35328
- LocaleDataIndex[LocaleDataIndex["DateFormat"] = 10] = "DateFormat";
35329
- LocaleDataIndex[LocaleDataIndex["TimeFormat"] = 11] = "TimeFormat";
35330
- LocaleDataIndex[LocaleDataIndex["DateTimeFormat"] = 12] = "DateTimeFormat";
35331
- LocaleDataIndex[LocaleDataIndex["NumberSymbols"] = 13] = "NumberSymbols";
35332
- LocaleDataIndex[LocaleDataIndex["NumberFormats"] = 14] = "NumberFormats";
35333
- LocaleDataIndex[LocaleDataIndex["CurrencyCode"] = 15] = "CurrencyCode";
35334
- LocaleDataIndex[LocaleDataIndex["CurrencySymbol"] = 16] = "CurrencySymbol";
35335
- LocaleDataIndex[LocaleDataIndex["CurrencyName"] = 17] = "CurrencyName";
35336
- LocaleDataIndex[LocaleDataIndex["Currencies"] = 18] = "Currencies";
35337
- LocaleDataIndex[LocaleDataIndex["Directionality"] = 19] = "Directionality";
35338
- LocaleDataIndex[LocaleDataIndex["PluralCase"] = 20] = "PluralCase";
35339
- LocaleDataIndex[LocaleDataIndex["ExtraData"] = 21] = "ExtraData";
35340
- })(LocaleDataIndex || (LocaleDataIndex = {}));
35341
-
35342
- /**
35343
- * @license
35344
- * Copyright Google LLC All Rights Reserved.
35345
- *
35346
- * Use of this source code is governed by an MIT-style license that can be
35347
- * found in the LICENSE file at https://angular.io/license
35348
- */
35349
- /**
35350
- * The locale id that the application is using by default (for translations and ICU expressions).
35351
- */
35352
- const DEFAULT_LOCALE_ID = 'en-US';
35353
- /**
35354
- * USD currency code that the application uses by default for CurrencyPipe when no
35355
- * DEFAULT_CURRENCY_CODE is provided.
35356
- */
35357
- const USD_CURRENCY_CODE = 'USD';
35358
-
35359
- /**
35360
- * @license
35361
- * Copyright Google LLC All Rights Reserved.
35362
- *
35363
- * Use of this source code is governed by an MIT-style license that can be
35364
- * found in the LICENSE file at https://angular.io/license
35365
- */
35366
- /**
35367
- * The locale id that the application is currently using (for translations and ICU expressions).
35368
- * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine
35369
- * but is now defined as a global value.
35370
- */
35371
- let LOCALE_ID = DEFAULT_LOCALE_ID;
35372
- /**
35373
- * Sets the locale id that will be used for translations and ICU expressions.
35374
- * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine
35375
- * but is now defined as a global value.
35376
- *
35377
- * @param localeId
35378
- */
35379
- function setLocaleId(localeId) {
35380
- assertDefined(localeId, `Expected localeId to be defined`);
35381
- if (typeof localeId === 'string') {
35382
- LOCALE_ID = localeId.toLowerCase().replace(/_/g, '-');
35383
- }
35384
- }
35385
-
35386
- /**
35387
- * @license
35388
- * Copyright Google LLC All Rights Reserved.
35389
- *
35390
- * Use of this source code is governed by an MIT-style license that can be
35391
- * found in the LICENSE file at https://angular.io/license
35392
- */
35393
- /**
35394
- * NOTE: changes to the `ngI18nClosureMode` name must be synced with `compiler-cli/src/tooling.ts`.
35395
- */
35396
- if (typeof ngI18nClosureMode === 'undefined') {
35397
- // These property accesses can be ignored because ngI18nClosureMode will be set to false
35398
- // when optimizing code and the whole if statement will be dropped.
35399
- // Make sure to refer to ngI18nClosureMode as ['ngI18nClosureMode'] for closure.
35400
- // NOTE: we need to have it in IIFE so that the tree-shaker is happy.
35401
- (function () {
35402
- // tslint:disable-next-line:no-toplevel-property-access
35403
- _global$1['ngI18nClosureMode'] =
35404
- // TODO(FW-1250): validate that this actually, you know, works.
35405
- // tslint:disable-next-line:no-toplevel-property-access
35406
- typeof goog !== 'undefined' && typeof goog.getMsg === 'function';
35407
- })();
35408
- }
35409
-
35410
35523
  /*! *****************************************************************************
35411
35524
  Copyright (c) Microsoft Corporation. All rights reserved.
35412
35525
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@@ -38890,7 +39003,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
38890
39003
  * Use of this source code is governed by an MIT-style license that can be
38891
39004
  * found in the LICENSE file at https://angular.io/license
38892
39005
  */
38893
- if (ngDevMode) {
39006
+ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
38894
39007
  // This helper is to give a reasonable error message to people upgrading to v9 that have not yet
38895
39008
  // installed `@angular/localize` in their app.
38896
39009
  // tslint:disable-next-line: no-toplevel-property-access