@angular/language-service 7.1.0 → 7.1.4

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 v7.1.0
2
+ * @license Angular v7.1.4
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -15142,7 +15142,7 @@ define(['exports', 'fs', 'path', 'typescript'], function (exports, fs, path, ts)
15142
15142
  * Use of this source code is governed by an MIT-style license that can be
15143
15143
  * found in the LICENSE file at https://angular.io/license
15144
15144
  */
15145
- var VERSION$1 = new Version('7.1.0');
15145
+ var VERSION$1 = new Version('7.1.4');
15146
15146
 
15147
15147
  /**
15148
15148
  * @license
@@ -28731,6 +28731,27 @@ define(['exports', 'fs', 'path', 'typescript'], function (exports, fs, path, ts)
28731
28731
  * Use of this source code is governed by an MIT-style license that can be
28732
28732
  * found in the LICENSE file at https://angular.io/license
28733
28733
  */
28734
+ /**
28735
+ * Injection flags for DI.
28736
+ *
28737
+ * @publicApi
28738
+ */
28739
+ var InjectFlags;
28740
+ (function (InjectFlags) {
28741
+ // TODO(alxhub): make this 'const' when ngc no longer writes exports of it into ngfactory files.
28742
+ InjectFlags[InjectFlags["Default"] = 0] = "Default";
28743
+ /**
28744
+ * Specifies that an injector should retrieve a dependency from any injector until reaching the
28745
+ * host element of the current component. (Only used with Element Injector)
28746
+ */
28747
+ InjectFlags[InjectFlags["Host"] = 1] = "Host";
28748
+ /** Don't descend into ancestors of the node requesting injection. */
28749
+ InjectFlags[InjectFlags["Self"] = 2] = "Self";
28750
+ /** Skip the node that is requesting injection. */
28751
+ InjectFlags[InjectFlags["SkipSelf"] = 4] = "SkipSelf";
28752
+ /** Inject `defaultValue` instead if token not found. */
28753
+ InjectFlags[InjectFlags["Optional"] = 8] = "Optional";
28754
+ })(InjectFlags || (InjectFlags = {}));
28734
28755
  /**
28735
28756
  * Current injector value used by `inject`.
28736
28757
  * - `undefined`: it is an error to call `inject`
@@ -28762,7 +28783,7 @@ define(['exports', 'fs', 'path', 'typescript'], function (exports, fs, path, ts)
28762
28783
  return previous;
28763
28784
  }
28764
28785
  function injectInjectorOnly(token, flags) {
28765
- if (flags === void 0) { flags = 0 /* Default */; }
28786
+ if (flags === void 0) { flags = InjectFlags.Default; }
28766
28787
  if (_currentInjector === undefined) {
28767
28788
  throw new Error("inject() must be called from an injection context");
28768
28789
  }
@@ -28770,11 +28791,11 @@ define(['exports', 'fs', 'path', 'typescript'], function (exports, fs, path, ts)
28770
28791
  return injectRootLimpMode(token, undefined, flags);
28771
28792
  }
28772
28793
  else {
28773
- return _currentInjector.get(token, flags & 8 /* Optional */ ? null : undefined, flags);
28794
+ return _currentInjector.get(token, flags & InjectFlags.Optional ? null : undefined, flags);
28774
28795
  }
28775
28796
  }
28776
28797
  function inject(token, flags) {
28777
- if (flags === void 0) { flags = 0 /* Default */; }
28798
+ if (flags === void 0) { flags = InjectFlags.Default; }
28778
28799
  return (_injectImplementation || injectInjectorOnly)(token, flags);
28779
28800
  }
28780
28801
  /**
@@ -28790,7 +28811,7 @@ define(['exports', 'fs', 'path', 'typescript'], function (exports, fs, path, ts)
28790
28811
  return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :
28791
28812
  injectableDef.value;
28792
28813
  }
28793
- if (flags & 8 /* Optional */)
28814
+ if (flags & InjectFlags.Optional)
28794
28815
  return null;
28795
28816
  if (notFoundValue !== undefined)
28796
28817
  return notFoundValue;
@@ -28805,17 +28826,17 @@ define(['exports', 'fs', 'path', 'typescript'], function (exports, fs, path, ts)
28805
28826
  throw new Error('Arguments array must have arguments.');
28806
28827
  }
28807
28828
  var type = undefined;
28808
- var flags = 0 /* Default */;
28829
+ var flags = InjectFlags.Default;
28809
28830
  for (var j = 0; j < arg.length; j++) {
28810
28831
  var meta = arg[j];
28811
28832
  if (meta instanceof Optional || meta.ngMetadataName === 'Optional') {
28812
- flags |= 8 /* Optional */;
28833
+ flags |= InjectFlags.Optional;
28813
28834
  }
28814
28835
  else if (meta instanceof SkipSelf || meta.ngMetadataName === 'SkipSelf') {
28815
- flags |= 4 /* SkipSelf */;
28836
+ flags |= InjectFlags.SkipSelf;
28816
28837
  }
28817
28838
  else if (meta instanceof Self || meta.ngMetadataName === 'Self') {
28818
- flags |= 2 /* Self */;
28839
+ flags |= InjectFlags.Self;
28819
28840
  }
28820
28841
  else if (meta instanceof Inject) {
28821
28842
  type = meta.token;
@@ -29869,7 +29890,7 @@ define(['exports', 'fs', 'path', 'typescript'], function (exports, fs, path, ts)
29869
29890
  * @returns the value from the injector or `null` when not found
29870
29891
  */
29871
29892
  function getOrCreateInjectable(tNode, lViewData, token, flags, notFoundValue) {
29872
- if (flags === void 0) { flags = 0 /* Default */; }
29893
+ if (flags === void 0) { flags = InjectFlags.Default; }
29873
29894
  var bloomHash = bloomHashBitOrFactory(token);
29874
29895
  // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef
29875
29896
  // so just call the factory function to create it.
@@ -29879,7 +29900,7 @@ define(['exports', 'fs', 'path', 'typescript'], function (exports, fs, path, ts)
29879
29900
  setTNodeAndViewData(tNode, lViewData);
29880
29901
  try {
29881
29902
  var value = bloomHash();
29882
- if (value == null && !(flags & 8 /* Optional */)) {
29903
+ if (value == null && !(flags & InjectFlags.Optional)) {
29883
29904
  throw new Error("No provider for " + stringify$2(token));
29884
29905
  }
29885
29906
  else {
@@ -29899,7 +29920,7 @@ define(['exports', 'fs', 'path', 'typescript'], function (exports, fs, path, ts)
29899
29920
  var parentLocation = NO_PARENT_INJECTOR;
29900
29921
  // If we should skip this injector, or if there is no injector on this node, start by searching
29901
29922
  // the parent injector.
29902
- if (injectorIndex === -1 || flags & 4 /* SkipSelf */) {
29923
+ if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {
29903
29924
  parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lViewData) :
29904
29925
  lViewData[injectorIndex + PARENT_INJECTOR];
29905
29926
  if (!shouldSearchParent(flags, parentLocation)) {
@@ -29942,20 +29963,20 @@ define(['exports', 'fs', 'path', 'typescript'], function (exports, fs, path, ts)
29942
29963
  }
29943
29964
  }
29944
29965
  }
29945
- if (flags & 8 /* Optional */ && notFoundValue === undefined) {
29966
+ if (flags & InjectFlags.Optional && notFoundValue === undefined) {
29946
29967
  // This must be set or the NullInjector will throw for optional deps
29947
29968
  notFoundValue = null;
29948
29969
  }
29949
- if ((flags & (2 /* Self */ | 1 /* Host */)) === 0) {
29970
+ if ((flags & (InjectFlags.Self | InjectFlags.Host)) === 0) {
29950
29971
  var moduleInjector = lViewData[INJECTOR];
29951
29972
  if (moduleInjector) {
29952
- return moduleInjector.get(token, notFoundValue, flags & 8 /* Optional */);
29973
+ return moduleInjector.get(token, notFoundValue, flags & InjectFlags.Optional);
29953
29974
  }
29954
29975
  else {
29955
- return injectRootLimpMode(token, notFoundValue, flags & 8 /* Optional */);
29976
+ return injectRootLimpMode(token, notFoundValue, flags & InjectFlags.Optional);
29956
29977
  }
29957
29978
  }
29958
- if (flags & 8 /* Optional */) {
29979
+ if (flags & InjectFlags.Optional) {
29959
29980
  return notFoundValue;
29960
29981
  }
29961
29982
  else {
@@ -30077,8 +30098,8 @@ define(['exports', 'fs', 'path', 'typescript'], function (exports, fs, path, ts)
30077
30098
  }
30078
30099
  /** Returns true if flags prevent parent injector from being searched for tokens */
30079
30100
  function shouldSearchParent(flags, parentLocation) {
30080
- return !(flags & 2 /* Self */ ||
30081
- (flags & 1 /* Host */ &&
30101
+ return !(flags & InjectFlags.Self ||
30102
+ (flags & InjectFlags.Host &&
30082
30103
  (parentLocation & 32768 /* AcrossHostBoundary */)));
30083
30104
  }
30084
30105
  var NodeInjector = /** @class */ (function () {
@@ -30565,7 +30586,7 @@ define(['exports', 'fs', 'path', 'typescript'], function (exports, fs, path, ts)
30565
30586
  recursivelyProcessProviders(records, providers);
30566
30587
  }
30567
30588
  StaticInjector.prototype.get = function (token, notFoundValue, flags) {
30568
- if (flags === void 0) { flags = 0 /* Default */; }
30589
+ if (flags === void 0) { flags = InjectFlags.Default; }
30569
30590
  var record = this._records.get(token);
30570
30591
  try {
30571
30592
  return tryResolveToken(token, record, this._records, this.parent, notFoundValue, flags);
@@ -30690,7 +30711,7 @@ define(['exports', 'fs', 'path', 'typescript'], function (exports, fs, path, ts)
30690
30711
  function resolveToken(token, record, records, parent, notFoundValue, flags) {
30691
30712
  var _a;
30692
30713
  var value;
30693
- if (record && !(flags & 4 /* SkipSelf */)) {
30714
+ if (record && !(flags & InjectFlags.SkipSelf)) {
30694
30715
  // If we don't have a record, this implies that we don't own the provider hence don't know how
30695
30716
  // to resolve it.
30696
30717
  value = record.value;
@@ -30720,14 +30741,14 @@ define(['exports', 'fs', 'path', 'typescript'], function (exports, fs, path, ts)
30720
30741
  records,
30721
30742
  // If we don't know how to resolve dependency and we should not check parent for it,
30722
30743
  // than pass in Null injector.
30723
- !childRecord && !(options & 4 /* CheckParent */) ? NULL_INJECTOR : parent, options & 1 /* Optional */ ? null : Injector.THROW_IF_NOT_FOUND, 0 /* Default */));
30744
+ !childRecord && !(options & 4 /* CheckParent */) ? NULL_INJECTOR : parent, options & 1 /* Optional */ ? null : Injector.THROW_IF_NOT_FOUND, InjectFlags.Default));
30724
30745
  }
30725
30746
  }
30726
30747
  record.value = value = useNew ? new ((_a = fn).bind.apply(_a, __spread([void 0], deps)))() : fn.apply(obj, deps);
30727
30748
  }
30728
30749
  }
30729
- else if (!(flags & 2 /* Self */)) {
30730
- value = parent.get(token, notFoundValue, 0 /* Default */);
30750
+ else if (!(flags & InjectFlags.Self)) {
30751
+ value = parent.get(token, notFoundValue, InjectFlags.Default);
30731
30752
  }
30732
30753
  return value;
30733
30754
  }
@@ -32399,7 +32420,7 @@ define(['exports', 'fs', 'path', 'typescript'], function (exports, fs, path, ts)
32399
32420
  this._hostView = _hostView;
32400
32421
  }
32401
32422
  NodeInjector$$1.prototype.get = function (token, notFoundValue) {
32402
- return getOrCreateInjectable(this._tNode, this._hostView, token, 0 /* Default */, notFoundValue);
32423
+ return getOrCreateInjectable(this._tNode, this._hostView, token, InjectFlags.Default, notFoundValue);
32403
32424
  };
32404
32425
  return NodeInjector$$1;
32405
32426
  }());
@@ -32705,13 +32726,13 @@ define(['exports', 'fs', 'path', 'typescript'], function (exports, fs, path, ts)
32705
32726
  };
32706
32727
  R3Injector.prototype.get = function (token, notFoundValue, flags) {
32707
32728
  if (notFoundValue === void 0) { notFoundValue = THROW_IF_NOT_FOUND; }
32708
- if (flags === void 0) { flags = 0 /* Default */; }
32729
+ if (flags === void 0) { flags = InjectFlags.Default; }
32709
32730
  this.assertNotDestroyed();
32710
32731
  // Set the injection context.
32711
32732
  var previousInjector = setCurrentInjector(this);
32712
32733
  try {
32713
32734
  // Check for the SkipSelf flag.
32714
- if (!(flags & 4 /* SkipSelf */)) {
32735
+ if (!(flags & InjectFlags.SkipSelf)) {
32715
32736
  // SkipSelf isn't set, check if the record belongs to this injector.
32716
32737
  var record = this.records.get(token);
32717
32738
  if (record === undefined) {
@@ -32732,7 +32753,7 @@ define(['exports', 'fs', 'path', 'typescript'], function (exports, fs, path, ts)
32732
32753
  }
32733
32754
  // Select the next injector based on the Self flag - if self is set, the next injector is
32734
32755
  // the NullInjector, otherwise it's the parent.
32735
- var nextInjector = !(flags & 2 /* Self */) ? this.parent : getNullInjector();
32756
+ var nextInjector = !(flags & InjectFlags.Self) ? this.parent : getNullInjector();
32736
32757
  return nextInjector.get(token, notFoundValue);
32737
32758
  }
32738
32759
  finally {
@@ -33173,7 +33194,7 @@ define(['exports', 'fs', 'path', 'typescript'], function (exports, fs, path, ts)
33173
33194
  /**
33174
33195
  * @publicApi
33175
33196
  */
33176
- var VERSION$2 = new Version$1('7.1.0');
33197
+ var VERSION$2 = new Version$1('7.1.4');
33177
33198
 
33178
33199
  /**
33179
33200
  * @license
@@ -47043,12 +47064,12 @@ define(['exports', 'fs', 'path', 'typescript'], function (exports, fs, path, ts)
47043
47064
  }
47044
47065
  NgModuleRef_.prototype.get = function (token, notFoundValue, injectFlags) {
47045
47066
  if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }
47046
- if (injectFlags === void 0) { injectFlags = 0 /* Default */; }
47067
+ if (injectFlags === void 0) { injectFlags = InjectFlags.Default; }
47047
47068
  var flags = 0 /* None */;
47048
- if (injectFlags & 4 /* SkipSelf */) {
47069
+ if (injectFlags & InjectFlags.SkipSelf) {
47049
47070
  flags |= 1 /* SkipSelf */;
47050
47071
  }
47051
- else if (injectFlags & 2 /* Self */) {
47072
+ else if (injectFlags & InjectFlags.Self) {
47052
47073
  flags |= 4 /* Self */;
47053
47074
  }
47054
47075
  return resolveNgModuleDep(this, { token: token, tokenKey: tokenKey(token), flags: flags }, notFoundValue);
@@ -50337,7 +50358,7 @@ define(['exports', 'fs', 'path', 'typescript'], function (exports, fs, path, ts)
50337
50358
  * Use of this source code is governed by an MIT-style license that can be
50338
50359
  * found in the LICENSE file at https://angular.io/license
50339
50360
  */
50340
- var VERSION$3 = new Version$1('7.1.0');
50361
+ var VERSION$3 = new Version$1('7.1.4');
50341
50362
 
50342
50363
  /**
50343
50364
  * @license