@angular/language-service 10.0.10 → 10.0.14

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.
package/bundles/ivy.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v10.0.10
2
+ * @license Angular v10.0.14
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  * License: MIT
5
5
  */
@@ -18859,7 +18859,7 @@ define(['exports', 'os', 'typescript', 'fs', 'constants', 'stream', 'util', 'ass
18859
18859
  * Use of this source code is governed by an MIT-style license that can be
18860
18860
  * found in the LICENSE file at https://angular.io/license
18861
18861
  */
18862
- const VERSION$1 = new Version('10.0.10');
18862
+ const VERSION$1 = new Version('10.0.14');
18863
18863
 
18864
18864
  /**
18865
18865
  * @license
@@ -19448,7 +19448,7 @@ define(['exports', 'os', 'typescript', 'fs', 'constants', 'stream', 'util', 'ass
19448
19448
  * Use of this source code is governed by an MIT-style license that can be
19449
19449
  * found in the LICENSE file at https://angular.io/license
19450
19450
  */
19451
- const VERSION$2 = new Version('10.0.10');
19451
+ const VERSION$2 = new Version('10.0.14');
19452
19452
 
19453
19453
  /**
19454
19454
  * @license
@@ -20656,8 +20656,9 @@ define(['exports', 'os', 'typescript', 'fs', 'constants', 'stream', 'util', 'ass
20656
20656
  }
20657
20657
  const { local, decl } = symbols;
20658
20658
  // It's only valid to convert a type reference to a value reference if the type actually
20659
- // has a value declaration associated with it.
20660
- if (decl.valueDeclaration === undefined) {
20659
+ // has a value declaration associated with it. Note that const enums are an exception,
20660
+ // because while they do have a value declaration, they don't exist at runtime.
20661
+ if (decl.valueDeclaration === undefined || decl.flags & ts.SymbolFlags.ConstEnum) {
20661
20662
  return noValueDeclaration(typeNode, decl.declarations[0]);
20662
20663
  }
20663
20664
  // The type points to a valid value declaration. Rewrite the TypeReference into an
@@ -33249,6 +33250,11 @@ Either add the @Injectable() decorator to '${provider.node.name
33249
33250
  });
33250
33251
  }
33251
33252
  }
33253
+ const templateId = fileData.sourceManager.getTemplateId(ref.node);
33254
+ shimData.templates.set(templateId, {
33255
+ template,
33256
+ boundTarget,
33257
+ });
33252
33258
  const tcbRequiresInline = requiresInlineTypeCheckBlock(ref.node);
33253
33259
  // If inlining is not supported, but is required for either the TCB or one of its directive
33254
33260
  // dependencies, then exit here with an error.
@@ -33256,7 +33262,6 @@ Either add the @Injectable() decorator to '${provider.node.name
33256
33262
  // This template cannot be supported because the underlying strategy does not support inlining
33257
33263
  // and inlining would be required.
33258
33264
  // Record diagnostics to indicate the issues with this template.
33259
- const templateId = fileData.sourceManager.getTemplateId(ref.node);
33260
33265
  if (tcbRequiresInline) {
33261
33266
  shimData.oobRecorder.requiresInlineTcb(templateId, ref.node);
33262
33267
  }
@@ -33356,6 +33361,7 @@ Either add the @Injectable() decorator to '${provider.node.name
33356
33361
  ],
33357
33362
  hasInlines: pendingFileData.hasInlines,
33358
33363
  path: pendingShimData.file.fileName,
33364
+ templates: pendingShimData.templates,
33359
33365
  });
33360
33366
  updates.set(pendingShimData.file.fileName, pendingShimData.file.render());
33361
33367
  }
@@ -33379,6 +33385,7 @@ Either add the @Injectable() decorator to '${provider.node.name
33379
33385
  domSchemaChecker: new RegistryDomSchemaChecker(fileData.sourceManager),
33380
33386
  oobRecorder: new OutOfBandDiagnosticRecorderImpl(fileData.sourceManager),
33381
33387
  file: new TypeCheckFile(shimPath, this.config, this.refEmitter, this.reflector, this.compilerHost),
33388
+ templates: new Map(),
33382
33389
  });
33383
33390
  }
33384
33391
  return fileData.shimData.get(shimPath);
@@ -33640,6 +33647,22 @@ Either add the @Injectable() decorator to '${provider.node.name
33640
33647
  }
33641
33648
  }
33642
33649
  }
33650
+ getTemplate(component) {
33651
+ this.ensureShimForComponent(component);
33652
+ const sf = component.getSourceFile();
33653
+ const sfPath = absoluteFromSourceFile(sf);
33654
+ const shimPath = this.typeCheckingStrategy.shimPathForComponent(component);
33655
+ const fileRecord = this.getFileData(sfPath);
33656
+ if (!fileRecord.shimData.has(shimPath)) {
33657
+ return [];
33658
+ }
33659
+ const templateId = fileRecord.sourceManager.getTemplateId(component);
33660
+ const shimRecord = fileRecord.shimData.get(shimPath);
33661
+ if (!shimRecord.templates.has(templateId)) {
33662
+ return null;
33663
+ }
33664
+ return shimRecord.templates.get(templateId).template;
33665
+ }
33643
33666
  overrideComponentTemplate(component, template) {
33644
33667
  const { nodes, errors } = parseTemplate(template, 'override.html', {
33645
33668
  preserveWhitespaces: true,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v10.0.10
2
+ * @license Angular v10.0.14
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  * License: MIT
5
5
  */
@@ -17647,7 +17647,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
17647
17647
  * Use of this source code is governed by an MIT-style license that can be
17648
17648
  * found in the LICENSE file at https://angular.io/license
17649
17649
  */
17650
- const VERSION$1 = new Version('10.0.10');
17650
+ const VERSION$1 = new Version('10.0.14');
17651
17651
 
17652
17652
  /**
17653
17653
  * @license
@@ -33611,7 +33611,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
33611
33611
  /**
33612
33612
  * @publicApi
33613
33613
  */
33614
- const VERSION$2 = new Version$1('10.0.10');
33614
+ const VERSION$2 = new Version$1('10.0.14');
33615
33615
 
33616
33616
  /**
33617
33617
  * @license
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/language-service",
3
- "version": "10.0.10",
3
+ "version": "10.0.14",
4
4
  "description": "Angular - language services",
5
5
  "main": "./bundles/language-service.js",
6
6
  "typings": "./index.d.ts",