@angular/language-service 12.1.0 → 12.1.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.
- package/bundles/ivy.js +60 -13
- package/bundles/language-service.js +3 -3
- package/package.json +1 -1
package/bundles/ivy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v12.1.
|
|
2
|
+
* @license Angular v12.1.1
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -18053,7 +18053,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'os', 'typescript', 'fs', '
|
|
|
18053
18053
|
* Use of this source code is governed by an MIT-style license that can be
|
|
18054
18054
|
* found in the LICENSE file at https://angular.io/license
|
|
18055
18055
|
*/
|
|
18056
|
-
const VERSION$1 = new Version('12.1.
|
|
18056
|
+
const VERSION$1 = new Version('12.1.1');
|
|
18057
18057
|
|
|
18058
18058
|
/**
|
|
18059
18059
|
* @license
|
|
@@ -18692,7 +18692,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'os', 'typescript', 'fs', '
|
|
|
18692
18692
|
function compileDeclareClassMetadata(metadata) {
|
|
18693
18693
|
const definitionMap = new DefinitionMap();
|
|
18694
18694
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
18695
|
-
definitionMap.set('version', literal('12.1.
|
|
18695
|
+
definitionMap.set('version', literal('12.1.1'));
|
|
18696
18696
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
18697
18697
|
definitionMap.set('type', metadata.type);
|
|
18698
18698
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -18732,7 +18732,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'os', 'typescript', 'fs', '
|
|
|
18732
18732
|
function createDirectiveDefinitionMap(meta) {
|
|
18733
18733
|
const definitionMap = new DefinitionMap();
|
|
18734
18734
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
18735
|
-
definitionMap.set('version', literal('12.1.
|
|
18735
|
+
definitionMap.set('version', literal('12.1.1'));
|
|
18736
18736
|
// e.g. `type: MyDirective`
|
|
18737
18737
|
definitionMap.set('type', meta.internalType);
|
|
18738
18738
|
// e.g. `selector: 'some-dir'`
|
|
@@ -18949,7 +18949,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'os', 'typescript', 'fs', '
|
|
|
18949
18949
|
function compileDeclareFactoryFunction(meta) {
|
|
18950
18950
|
const definitionMap = new DefinitionMap();
|
|
18951
18951
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
18952
|
-
definitionMap.set('version', literal('12.1.
|
|
18952
|
+
definitionMap.set('version', literal('12.1.1'));
|
|
18953
18953
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
18954
18954
|
definitionMap.set('type', meta.internalType);
|
|
18955
18955
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -18991,7 +18991,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'os', 'typescript', 'fs', '
|
|
|
18991
18991
|
function createInjectableDefinitionMap(meta) {
|
|
18992
18992
|
const definitionMap = new DefinitionMap();
|
|
18993
18993
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
18994
|
-
definitionMap.set('version', literal('12.1.
|
|
18994
|
+
definitionMap.set('version', literal('12.1.1'));
|
|
18995
18995
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
18996
18996
|
definitionMap.set('type', meta.internalType);
|
|
18997
18997
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -19070,7 +19070,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'os', 'typescript', 'fs', '
|
|
|
19070
19070
|
function createInjectorDefinitionMap(meta) {
|
|
19071
19071
|
const definitionMap = new DefinitionMap();
|
|
19072
19072
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
19073
|
-
definitionMap.set('version', literal('12.1.
|
|
19073
|
+
definitionMap.set('version', literal('12.1.1'));
|
|
19074
19074
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
19075
19075
|
definitionMap.set('type', meta.internalType);
|
|
19076
19076
|
definitionMap.set('providers', meta.providers);
|
|
@@ -19107,7 +19107,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'os', 'typescript', 'fs', '
|
|
|
19107
19107
|
function createNgModuleDefinitionMap(meta) {
|
|
19108
19108
|
const definitionMap = new DefinitionMap();
|
|
19109
19109
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
19110
|
-
definitionMap.set('version', literal('12.1.
|
|
19110
|
+
definitionMap.set('version', literal('12.1.1'));
|
|
19111
19111
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
19112
19112
|
definitionMap.set('type', meta.internalType);
|
|
19113
19113
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -19165,7 +19165,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'os', 'typescript', 'fs', '
|
|
|
19165
19165
|
function createPipeDefinitionMap(meta) {
|
|
19166
19166
|
const definitionMap = new DefinitionMap();
|
|
19167
19167
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
|
|
19168
|
-
definitionMap.set('version', literal('12.1.
|
|
19168
|
+
definitionMap.set('version', literal('12.1.1'));
|
|
19169
19169
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
19170
19170
|
// e.g. `type: MyPipe`
|
|
19171
19171
|
definitionMap.set('type', meta.internalType);
|
|
@@ -19197,7 +19197,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'os', 'typescript', 'fs', '
|
|
|
19197
19197
|
* Use of this source code is governed by an MIT-style license that can be
|
|
19198
19198
|
* found in the LICENSE file at https://angular.io/license
|
|
19199
19199
|
*/
|
|
19200
|
-
const VERSION$2 = new Version('12.1.
|
|
19200
|
+
const VERSION$2 = new Version('12.1.1');
|
|
19201
19201
|
|
|
19202
19202
|
/**
|
|
19203
19203
|
* @license
|
|
@@ -22467,8 +22467,11 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'os', 'typescript', 'fs', '
|
|
|
22467
22467
|
static fromComplexFunctionCall(node, fn) {
|
|
22468
22468
|
return new DynamicValue(node, fn, 6 /* COMPLEX_FUNCTION_CALL */);
|
|
22469
22469
|
}
|
|
22470
|
+
static fromDynamicType(node) {
|
|
22471
|
+
return new DynamicValue(node, undefined, 7 /* DYNAMIC_TYPE */);
|
|
22472
|
+
}
|
|
22470
22473
|
static fromUnknown(node) {
|
|
22471
|
-
return new DynamicValue(node, undefined,
|
|
22474
|
+
return new DynamicValue(node, undefined, 8 /* UNKNOWN */);
|
|
22472
22475
|
}
|
|
22473
22476
|
isFromDynamicInput() {
|
|
22474
22477
|
return this.code === 0 /* DYNAMIC_INPUT */;
|
|
@@ -22491,8 +22494,11 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'os', 'typescript', 'fs', '
|
|
|
22491
22494
|
isFromComplexFunctionCall() {
|
|
22492
22495
|
return this.code === 6 /* COMPLEX_FUNCTION_CALL */;
|
|
22493
22496
|
}
|
|
22497
|
+
isFromDynamicType() {
|
|
22498
|
+
return this.code === 7 /* DYNAMIC_TYPE */;
|
|
22499
|
+
}
|
|
22494
22500
|
isFromUnknown() {
|
|
22495
|
-
return this.code ===
|
|
22501
|
+
return this.code === 8 /* UNKNOWN */;
|
|
22496
22502
|
}
|
|
22497
22503
|
accept(visitor) {
|
|
22498
22504
|
switch (this.code) {
|
|
@@ -22510,7 +22516,9 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'os', 'typescript', 'fs', '
|
|
|
22510
22516
|
return visitor.visitInvalidExpressionType(this);
|
|
22511
22517
|
case 6 /* COMPLEX_FUNCTION_CALL */:
|
|
22512
22518
|
return visitor.visitComplexFunctionCall(this);
|
|
22513
|
-
case 7 /*
|
|
22519
|
+
case 7 /* DYNAMIC_TYPE */:
|
|
22520
|
+
return visitor.visitDynamicType(this);
|
|
22521
|
+
case 8 /* UNKNOWN */:
|
|
22514
22522
|
return visitor.visitUnknown(this);
|
|
22515
22523
|
}
|
|
22516
22524
|
}
|
|
@@ -22678,6 +22686,9 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'os', 'typescript', 'fs', '
|
|
|
22678
22686
|
visitUnknownIdentifier(value) {
|
|
22679
22687
|
return [makeRelatedInformation(value.node, 'Unknown reference.')];
|
|
22680
22688
|
}
|
|
22689
|
+
visitDynamicType(value) {
|
|
22690
|
+
return [makeRelatedInformation(value.node, 'Dynamic type.')];
|
|
22691
|
+
}
|
|
22681
22692
|
visitUnsupportedSyntax(value) {
|
|
22682
22693
|
return [makeRelatedInformation(value.node, 'This syntax is not supported.')];
|
|
22683
22694
|
}
|
|
@@ -23167,6 +23178,23 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'os', 'typescript', 'fs', '
|
|
|
23167
23178
|
return this.visitExpression(value, context);
|
|
23168
23179
|
}
|
|
23169
23180
|
else if (isVariableDeclarationDeclared(node)) {
|
|
23181
|
+
// If the declaration has a literal type that can be statically reduced to a value, resolve to
|
|
23182
|
+
// that value. If not, the historical behavior for variable declarations is to return a
|
|
23183
|
+
// `Reference` to the variable, as the consumer could use it in a context where knowing its
|
|
23184
|
+
// static value is not necessary.
|
|
23185
|
+
//
|
|
23186
|
+
// Arguably, since the value cannot be statically determined, we should return a
|
|
23187
|
+
// `DynamicValue`. This returns a `Reference` because it's the same behavior as before
|
|
23188
|
+
// `visitType` was introduced.
|
|
23189
|
+
//
|
|
23190
|
+
// TODO(zarend): investigate switching to a `DynamicValue` and verify this won't break any
|
|
23191
|
+
// use cases, especially in ngcc
|
|
23192
|
+
if (node.type !== undefined) {
|
|
23193
|
+
const evaluatedType = this.visitType(node.type, context);
|
|
23194
|
+
if (!(evaluatedType instanceof DynamicValue)) {
|
|
23195
|
+
return evaluatedType;
|
|
23196
|
+
}
|
|
23197
|
+
}
|
|
23170
23198
|
return this.getReference(node, context);
|
|
23171
23199
|
}
|
|
23172
23200
|
else {
|
|
@@ -23524,6 +23552,25 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'os', 'typescript', 'fs', '
|
|
|
23524
23552
|
getReference(node, context) {
|
|
23525
23553
|
return new Reference$1(node, owningModule(context));
|
|
23526
23554
|
}
|
|
23555
|
+
visitType(node, context) {
|
|
23556
|
+
if (ts$1.isLiteralTypeNode(node)) {
|
|
23557
|
+
return this.visitExpression(node.literal, context);
|
|
23558
|
+
}
|
|
23559
|
+
else if (ts$1.isTupleTypeNode(node)) {
|
|
23560
|
+
return this.visitTupleType(node, context);
|
|
23561
|
+
}
|
|
23562
|
+
else if (ts$1.isNamedTupleMember(node)) {
|
|
23563
|
+
return this.visitType(node.type, context);
|
|
23564
|
+
}
|
|
23565
|
+
return DynamicValue.fromDynamicType(node);
|
|
23566
|
+
}
|
|
23567
|
+
visitTupleType(node, context) {
|
|
23568
|
+
const res = [];
|
|
23569
|
+
for (const elem of node.elements) {
|
|
23570
|
+
res.push(this.visitType(elem, context));
|
|
23571
|
+
}
|
|
23572
|
+
return res;
|
|
23573
|
+
}
|
|
23527
23574
|
}
|
|
23528
23575
|
function isFunctionOrMethodReference(ref) {
|
|
23529
23576
|
return ts$1.isFunctionDeclaration(ref.node) || ts$1.isMethodDeclaration(ref.node) ||
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v12.1.
|
|
2
|
+
* @license Angular v12.1.1
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -19594,7 +19594,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
|
|
|
19594
19594
|
* Use of this source code is governed by an MIT-style license that can be
|
|
19595
19595
|
* found in the LICENSE file at https://angular.io/license
|
|
19596
19596
|
*/
|
|
19597
|
-
const VERSION$1 = new Version('12.1.
|
|
19597
|
+
const VERSION$1 = new Version('12.1.1');
|
|
19598
19598
|
|
|
19599
19599
|
/**
|
|
19600
19600
|
* @license
|
|
@@ -35676,7 +35676,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
|
|
|
35676
35676
|
/**
|
|
35677
35677
|
* @publicApi
|
|
35678
35678
|
*/
|
|
35679
|
-
const VERSION$2 = new Version$1('12.1.
|
|
35679
|
+
const VERSION$2 = new Version$1('12.1.1');
|
|
35680
35680
|
|
|
35681
35681
|
/**
|
|
35682
35682
|
* @license
|