@angular/compiler-cli 13.3.0 → 13.3.3
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/{chunk-Z2HS4HDG.js → chunk-45NS77NQ.js} +3 -3
- package/bundles/chunk-45NS77NQ.js.map +6 -0
- package/bundles/{chunk-RK2SUO2Y.js → chunk-6DYPLTK7.js} +96 -54
- package/bundles/chunk-6DYPLTK7.js.map +6 -0
- package/bundles/{chunk-LUJ2SCC7.js → chunk-6S4GKCLN.js} +7 -7
- package/bundles/chunk-6S4GKCLN.js.map +6 -0
- package/bundles/{chunk-IPB4UIZT.js → chunk-AO2UNHEQ.js} +3 -3
- package/bundles/chunk-AO2UNHEQ.js.map +6 -0
- package/bundles/{chunk-FXU7FMZC.js → chunk-CLV7JFJQ.js} +2 -2
- package/bundles/chunk-CLV7JFJQ.js.map +6 -0
- package/bundles/{chunk-K2Z44JHH.js → chunk-EIFOOEXQ.js} +2 -2
- package/bundles/chunk-EIFOOEXQ.js.map +6 -0
- package/bundles/{chunk-WQ3TNYTD.js → chunk-GMSUYBZP.js} +8 -11
- package/bundles/{chunk-WQ3TNYTD.js.map → chunk-GMSUYBZP.js.map} +0 -0
- package/bundles/{chunk-A5PL3TE6.js → chunk-HTCAZIYK.js} +3 -3
- package/bundles/chunk-HTCAZIYK.js.map +6 -0
- package/bundles/{chunk-SKBLJA43.js → chunk-LX5Q27EF.js} +5 -5
- package/bundles/chunk-LX5Q27EF.js.map +6 -0
- package/bundles/{chunk-NC7BJDOB.js → chunk-MSOUQGBK.js} +6 -6
- package/bundles/chunk-MSOUQGBK.js.map +6 -0
- package/bundles/{chunk-7PY7XEFH.js → chunk-Q5GIQ3RV.js} +1 -1
- package/bundles/chunk-Q5GIQ3RV.js.map +6 -0
- package/bundles/{chunk-QDWL7SZJ.js → chunk-R3C7RFJ4.js} +1 -1
- package/bundles/chunk-R3C7RFJ4.js.map +6 -0
- package/bundles/{chunk-GLCRIILX.js → chunk-R4NY3TJC.js} +1 -1
- package/bundles/chunk-R4NY3TJC.js.map +6 -0
- package/bundles/{chunk-XNYP2SFR.js → chunk-WXB5AWIG.js} +2 -2
- package/bundles/chunk-WXB5AWIG.js.map +6 -0
- package/bundles/{chunk-GJECLAD3.js → chunk-YYOMS5IC.js} +10 -10
- package/bundles/chunk-YYOMS5IC.js.map +6 -0
- package/bundles/{chunk-ALKVYGAK.js → chunk-ZZF2R6KZ.js} +6 -6
- package/bundles/chunk-ZZF2R6KZ.js.map +6 -0
- package/bundles/index.js +10 -10
- package/bundles/index.js.map +1 -1
- package/bundles/linker/babel/index.js +6 -6
- package/bundles/linker/babel/index.js.map +1 -1
- package/bundles/linker/index.js +5 -5
- package/bundles/ngcc/index.js +12 -12
- package/bundles/ngcc/index.js.map +1 -1
- package/bundles/ngcc/main-ngcc.js +13 -13
- package/bundles/ngcc/main-ngcc.js.map +1 -1
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +11 -11
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js.map +1 -1
- package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +4 -4
- package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js.map +1 -1
- package/bundles/private/bazel.js +2 -2
- package/bundles/private/localize.js +4 -4
- package/bundles/private/migrations.js +6 -6
- package/bundles/private/tooling.js +3 -3
- package/bundles/src/bin/ng_xi18n.js +8 -8
- package/bundles/src/bin/ng_xi18n.js.map +1 -1
- package/bundles/src/bin/ngc.js +8 -8
- package/bundles/src/bin/ngc.js.map +1 -1
- package/bundles_metadata.json +1 -1
- package/ngcc/src/packages/build_marker.d.ts +1 -1
- package/package.json +2 -2
- package/src/ngtsc/tsc_plugin.d.ts +1 -1
- package/src/ngtsc/typecheck/api/checker.d.ts +6 -6
- package/src/ngtsc/typecheck/api/completion.d.ts +3 -3
- package/src/ngtsc/typecheck/api/symbols.d.ts +23 -16
- package/src/ngtsc/typecheck/src/checker.d.ts +5 -4
- package/src/ngtsc/typecheck/src/completion.d.ts +6 -5
- package/src/ngtsc/typecheck/src/template_symbol_builder.d.ts +4 -3
- package/bundles/chunk-7PY7XEFH.js.map +0 -6
- package/bundles/chunk-A5PL3TE6.js.map +0 -6
- package/bundles/chunk-ALKVYGAK.js.map +0 -6
- package/bundles/chunk-FXU7FMZC.js.map +0 -6
- package/bundles/chunk-GJECLAD3.js.map +0 -6
- package/bundles/chunk-GLCRIILX.js.map +0 -6
- package/bundles/chunk-IPB4UIZT.js.map +0 -6
- package/bundles/chunk-K2Z44JHH.js.map +0 -6
- package/bundles/chunk-LUJ2SCC7.js.map +0 -6
- package/bundles/chunk-NC7BJDOB.js.map +0 -6
- package/bundles/chunk-QDWL7SZJ.js.map +0 -6
- package/bundles/chunk-RK2SUO2Y.js.map +0 -6
- package/bundles/chunk-SKBLJA43.js.map +0 -6
- package/bundles/chunk-XNYP2SFR.js.map +0 -6
- package/bundles/chunk-Z2HS4HDG.js.map +0 -6
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
import {
|
|
7
7
|
ConsoleLogger,
|
|
8
8
|
LogLevel
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LX5Q27EF.js";
|
|
10
10
|
import {
|
|
11
11
|
NodeJSFileSystem,
|
|
12
12
|
setFileSystem
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CLV7JFJQ.js";
|
|
14
14
|
|
|
15
15
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/ngcc/src/command_line_options.mjs
|
|
16
16
|
import yargs from "yargs";
|
|
@@ -113,4 +113,4 @@ export {
|
|
|
113
113
|
* Use of this source code is governed by an MIT-style license that can be
|
|
114
114
|
* found in the LICENSE file at https://angular.io/license
|
|
115
115
|
*/
|
|
116
|
-
//# sourceMappingURL=chunk-
|
|
116
|
+
//# sourceMappingURL=chunk-45NS77NQ.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../packages/compiler-cli/ngcc/src/command_line_options.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAQA;AAPA,AAaM,iCAAkC,MAAc;;AACpD,QAAM,UACF,MAAM,IAAI,EACL,OAAO,KAAK;IACX,OAAO;IACP,UACI;IACJ,SAAS;IACT,MAAM;GACP,EACA,OAAO,KAAK,EAAC,OAAO,WAAW,QAAQ,MAAM,OAAO,MAAM,MAAM,SAAQ,CAAC,EACzE,OAAO,KAAK;IACX,OAAO;IACP,OAAO;IACP,UACI;IAIJ,MAAM;GACP,EACA,OAAO,KAAK;IACX,OAAO;IACP,UACI;IAGJ,MAAM;GACP,EACA,OAAO,4BAA4B;IAClC,MAAM;IACN,UACI;GAEL,EACA,OAAO,cAAc;IACpB,UACI;IAEJ,MAAM;GACP,EACA,OAAO,gBAAgB;IACtB,UACI;IAEJ,MAAM;GACP,EACA,OAAO,2BAA2B;IACjC,UACI;IAGJ,MAAM;GACP,EACA,OAAO,sBAAsB;IAC5B,UAAU;IAOV,MAAM;IACN,SAAS;GACV,EACA,OAAO,SAAS;IACf,UACI;IAEJ,MAAM;IACN,SAAS;GACV,EACA,OAAO,KAAK;IACX,OAAO;IACP,UAAU;IACV,SAAS,CAAC,SAAS,QAAQ,QAAQ,OAAO;IAC1C,MAAM;GACP,EACA,OAAO,mCAAmC;IACzC,UACI;IAEJ,MAAM;IACN,SAAS;GACV,EACA,OAAO,+BAA+B;IACrC,UACI;IAGJ,MAAM;IACN,SAAS;GACV,EACA,OAAO,YAAY;IAClB,UACI;IAGJ,MAAM;GACP,EACA,OAAM,EACN,KAAI,EACJ,UAAS;AAElB,MAAI,cAAQ,MAAR,mBAAW,QAAQ;AACrB,YAAQ,MACJ,+GAA+G;AACnH,YAAQ,KAAK,CAAC;;AAGhB,QAAM,KAAK,IAAI,iBAAgB;AAC/B,gBAAc,EAAE;AAEhB,QAAM,iBAAiB,GAAG,QAAQ,QAAQ,KAAK,gBAAgB;AAC/D,QAAM,uBAAuB,QAAQ;AACrC,QAAM,uBAAuB,QAAQ;AACrC,QAAM,oBAAoB,CAAC,QAAQ;AACnC,QAAM,cAAc,QAAQ;AAC5B,QAAM,6BAA6B,QAAQ;AAC3C,QAAM,WAAW,QAAQ;AACzB,QAAM,kCAAkC,QAAQ;AAChD,QAAM,+BAA+B,QAAQ;AAC7C,QAAM,0BAA0B,QAAQ;AACxC,QAAM,qCAAqC,QAAQ;AAInD,QAAM,eAAe,GAAG,QAAQ,eAAe,UAAU,OAAO,QAAQ;AAExE,QAAM,SAAS,YAAY,IAAI,cAAc,SAAS,SAAS;AAE/D,SAAO;IACL,UAAU;IACV;IACA;IACA;IACA;IACA;IACA;IACA;IACA,OAAO,QAAQ;IACf;IACA;IACA;IACA;;AAEJ;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -34,11 +34,11 @@ import {
|
|
|
34
34
|
ivyTransformFactory,
|
|
35
35
|
retagAllTsFiles,
|
|
36
36
|
untagAllTsFiles
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-MSOUQGBK.js";
|
|
38
38
|
import {
|
|
39
39
|
TypeScriptReflectionHost,
|
|
40
40
|
isNamedClassDeclaration
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-Q5GIQ3RV.js";
|
|
42
42
|
import {
|
|
43
43
|
AbsoluteModuleStrategy,
|
|
44
44
|
AliasStrategy,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
toUnredirectedSourceFile,
|
|
80
80
|
translateExpression,
|
|
81
81
|
translateType
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-WXB5AWIG.js";
|
|
83
83
|
import {
|
|
84
84
|
LogicalFileSystem,
|
|
85
85
|
absoluteFrom,
|
|
@@ -89,18 +89,18 @@ import {
|
|
|
89
89
|
getSourceFileOrError,
|
|
90
90
|
join,
|
|
91
91
|
resolve
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-CLV7JFJQ.js";
|
|
93
93
|
import {
|
|
94
94
|
ActivePerfRecorder,
|
|
95
95
|
DelegatingPerfRecorder,
|
|
96
96
|
PerfCheckpoint,
|
|
97
97
|
PerfEvent,
|
|
98
98
|
PerfPhase
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-R4NY3TJC.js";
|
|
100
100
|
import {
|
|
101
101
|
__spreadProps,
|
|
102
102
|
__spreadValues
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-GMSUYBZP.js";
|
|
104
104
|
|
|
105
105
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
|
|
106
106
|
var DEFAULT_ERROR_CODE = 100;
|
|
@@ -2164,10 +2164,11 @@ function hasExpressionIdentifier(sourceFile, node, identifier) {
|
|
|
2164
2164
|
|
|
2165
2165
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/completion.mjs
|
|
2166
2166
|
var CompletionEngine = class {
|
|
2167
|
-
constructor(tcb, data,
|
|
2167
|
+
constructor(tcb, data, tcbPath, tcbIsShim) {
|
|
2168
2168
|
this.tcb = tcb;
|
|
2169
2169
|
this.data = data;
|
|
2170
|
-
this.
|
|
2170
|
+
this.tcbPath = tcbPath;
|
|
2171
|
+
this.tcbIsShim = tcbIsShim;
|
|
2171
2172
|
this.templateContextCache = /* @__PURE__ */ new Map();
|
|
2172
2173
|
this.expressionCompletionCache = /* @__PURE__ */ new Map();
|
|
2173
2174
|
const globalRead = findFirstMatchingNode(this.tcb, {
|
|
@@ -2176,8 +2177,9 @@ var CompletionEngine = class {
|
|
|
2176
2177
|
});
|
|
2177
2178
|
if (globalRead !== null) {
|
|
2178
2179
|
this.componentContext = {
|
|
2179
|
-
|
|
2180
|
-
|
|
2180
|
+
tcbPath: this.tcbPath,
|
|
2181
|
+
isShimFile: this.tcbIsShim,
|
|
2182
|
+
positionInFile: globalRead.name.getStart()
|
|
2181
2183
|
};
|
|
2182
2184
|
} else {
|
|
2183
2185
|
this.componentContext = null;
|
|
@@ -2199,8 +2201,9 @@ var CompletionEngine = class {
|
|
|
2199
2201
|
});
|
|
2200
2202
|
if (nodeLocation !== null) {
|
|
2201
2203
|
nodeContext = {
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
+
tcbPath: this.tcbPath,
|
|
2205
|
+
isShimFile: this.tcbIsShim,
|
|
2206
|
+
positionInFile: nodeLocation.getStart()
|
|
2204
2207
|
};
|
|
2205
2208
|
}
|
|
2206
2209
|
}
|
|
@@ -2211,8 +2214,9 @@ var CompletionEngine = class {
|
|
|
2211
2214
|
});
|
|
2212
2215
|
if (nodeLocation) {
|
|
2213
2216
|
nodeContext = {
|
|
2214
|
-
|
|
2215
|
-
|
|
2217
|
+
tcbPath: this.tcbPath,
|
|
2218
|
+
isShimFile: this.tcbIsShim,
|
|
2219
|
+
positionInFile: nodeLocation.getStart()
|
|
2216
2220
|
};
|
|
2217
2221
|
}
|
|
2218
2222
|
}
|
|
@@ -2251,8 +2255,9 @@ var CompletionEngine = class {
|
|
|
2251
2255
|
return null;
|
|
2252
2256
|
}
|
|
2253
2257
|
const res = {
|
|
2254
|
-
|
|
2255
|
-
|
|
2258
|
+
tcbPath: this.tcbPath,
|
|
2259
|
+
isShimFile: this.tcbIsShim,
|
|
2260
|
+
positionInFile: tsExpr.name.getEnd()
|
|
2256
2261
|
};
|
|
2257
2262
|
this.expressionCompletionCache.set(expr, res);
|
|
2258
2263
|
return res;
|
|
@@ -2284,8 +2289,9 @@ var CompletionEngine = class {
|
|
|
2284
2289
|
positionInShimFile -= 1;
|
|
2285
2290
|
}
|
|
2286
2291
|
const res = {
|
|
2287
|
-
|
|
2288
|
-
|
|
2292
|
+
tcbPath: this.tcbPath,
|
|
2293
|
+
isShimFile: this.tcbIsShim,
|
|
2294
|
+
positionInFile: positionInShimFile
|
|
2289
2295
|
};
|
|
2290
2296
|
this.expressionCompletionCache.set(expr, res);
|
|
2291
2297
|
return res;
|
|
@@ -4799,8 +4805,9 @@ var TemplateSourceManager = class {
|
|
|
4799
4805
|
import { AST, ASTWithSource as ASTWithSource3, BindingPipe as BindingPipe2, PropertyRead as PropertyRead5, PropertyWrite as PropertyWrite4, SafePropertyRead as SafePropertyRead4, TmplAstBoundAttribute as TmplAstBoundAttribute2, TmplAstBoundEvent, TmplAstElement as TmplAstElement4, TmplAstReference as TmplAstReference4, TmplAstTemplate as TmplAstTemplate3, TmplAstTextAttribute as TmplAstTextAttribute3, TmplAstVariable as TmplAstVariable3 } from "@angular/compiler";
|
|
4800
4806
|
import ts27 from "typescript";
|
|
4801
4807
|
var SymbolBuilder = class {
|
|
4802
|
-
constructor(
|
|
4803
|
-
this.
|
|
4808
|
+
constructor(tcbPath, tcbIsShim, typeCheckBlock, templateData, componentScopeReader, getTypeChecker) {
|
|
4809
|
+
this.tcbPath = tcbPath;
|
|
4810
|
+
this.tcbIsShim = tcbIsShim;
|
|
4804
4811
|
this.typeCheckBlock = typeCheckBlock;
|
|
4805
4812
|
this.templateData = templateData;
|
|
4806
4813
|
this.componentScopeReader = componentScopeReader;
|
|
@@ -4949,7 +4956,7 @@ var SymbolBuilder = class {
|
|
|
4949
4956
|
const addEventListener = outputFieldAccess.name;
|
|
4950
4957
|
const tsSymbol = this.getTypeChecker().getSymbolAtLocation(addEventListener);
|
|
4951
4958
|
const tsType = this.getTypeChecker().getTypeAtLocation(addEventListener);
|
|
4952
|
-
const
|
|
4959
|
+
const positionInFile = this.getTcbPositionForNode(addEventListener);
|
|
4953
4960
|
const target = this.getSymbol(consumer);
|
|
4954
4961
|
if (target === null || tsSymbol === void 0) {
|
|
4955
4962
|
continue;
|
|
@@ -4959,7 +4966,11 @@ var SymbolBuilder = class {
|
|
|
4959
4966
|
tsSymbol,
|
|
4960
4967
|
tsType,
|
|
4961
4968
|
target,
|
|
4962
|
-
|
|
4969
|
+
tcbLocation: {
|
|
4970
|
+
tcbPath: this.tcbPath,
|
|
4971
|
+
isShimFile: this.tcbIsShim,
|
|
4972
|
+
positionInFile
|
|
4973
|
+
}
|
|
4963
4974
|
});
|
|
4964
4975
|
} else {
|
|
4965
4976
|
if (!ts27.isElementAccessExpression(outputFieldAccess)) {
|
|
@@ -4973,14 +4984,18 @@ var SymbolBuilder = class {
|
|
|
4973
4984
|
if (target === null) {
|
|
4974
4985
|
continue;
|
|
4975
4986
|
}
|
|
4976
|
-
const
|
|
4987
|
+
const positionInFile = this.getTcbPositionForNode(outputFieldAccess);
|
|
4977
4988
|
const tsType = this.getTypeChecker().getTypeAtLocation(outputFieldAccess);
|
|
4978
4989
|
bindings.push({
|
|
4979
4990
|
kind: SymbolKind.Binding,
|
|
4980
4991
|
tsSymbol,
|
|
4981
4992
|
tsType,
|
|
4982
4993
|
target,
|
|
4983
|
-
|
|
4994
|
+
tcbLocation: {
|
|
4995
|
+
tcbPath: this.tcbPath,
|
|
4996
|
+
isShimFile: this.tcbIsShim,
|
|
4997
|
+
positionInFile
|
|
4998
|
+
}
|
|
4984
4999
|
});
|
|
4985
5000
|
}
|
|
4986
5001
|
}
|
|
@@ -5042,7 +5057,7 @@ var SymbolBuilder = class {
|
|
|
5042
5057
|
kind: SymbolKind.Directive,
|
|
5043
5058
|
tsSymbol: symbol.tsSymbol,
|
|
5044
5059
|
tsType: symbol.tsType,
|
|
5045
|
-
|
|
5060
|
+
tcbLocation: symbol.tcbLocation,
|
|
5046
5061
|
isComponent,
|
|
5047
5062
|
isStructural,
|
|
5048
5063
|
selector,
|
|
@@ -5061,12 +5076,13 @@ var SymbolBuilder = class {
|
|
|
5061
5076
|
return {
|
|
5062
5077
|
tsType: expressionSymbol.tsType,
|
|
5063
5078
|
tsSymbol: expressionSymbol.tsSymbol,
|
|
5064
|
-
initializerLocation: expressionSymbol.
|
|
5079
|
+
initializerLocation: expressionSymbol.tcbLocation,
|
|
5065
5080
|
kind: SymbolKind.Variable,
|
|
5066
5081
|
declaration: variable,
|
|
5067
5082
|
localVarLocation: {
|
|
5068
|
-
|
|
5069
|
-
|
|
5083
|
+
tcbPath: this.tcbPath,
|
|
5084
|
+
isShimFile: this.tcbIsShim,
|
|
5085
|
+
positionInFile: this.getTcbPositionForNode(node.name)
|
|
5070
5086
|
}
|
|
5071
5087
|
};
|
|
5072
5088
|
}
|
|
@@ -5084,9 +5100,10 @@ var SymbolBuilder = class {
|
|
|
5084
5100
|
if (symbol === null || symbol.tsSymbol === null) {
|
|
5085
5101
|
return null;
|
|
5086
5102
|
}
|
|
5087
|
-
const
|
|
5088
|
-
|
|
5089
|
-
|
|
5103
|
+
const referenceVarTcbLocation = {
|
|
5104
|
+
tcbPath: this.tcbPath,
|
|
5105
|
+
isShimFile: this.tcbIsShim,
|
|
5106
|
+
positionInFile: this.getTcbPositionForNode(node)
|
|
5090
5107
|
};
|
|
5091
5108
|
if (target instanceof TmplAstTemplate3 || target instanceof TmplAstElement4) {
|
|
5092
5109
|
return {
|
|
@@ -5095,8 +5112,8 @@ var SymbolBuilder = class {
|
|
|
5095
5112
|
tsType: symbol.tsType,
|
|
5096
5113
|
target,
|
|
5097
5114
|
declaration: ref,
|
|
5098
|
-
targetLocation: symbol.
|
|
5099
|
-
referenceVarLocation:
|
|
5115
|
+
targetLocation: symbol.tcbLocation,
|
|
5116
|
+
referenceVarLocation: referenceVarTcbLocation
|
|
5100
5117
|
};
|
|
5101
5118
|
} else {
|
|
5102
5119
|
if (!ts27.isClassDeclaration(target.directive.ref.node)) {
|
|
@@ -5108,8 +5125,8 @@ var SymbolBuilder = class {
|
|
|
5108
5125
|
tsType: symbol.tsType,
|
|
5109
5126
|
declaration: ref,
|
|
5110
5127
|
target: target.directive.ref.node,
|
|
5111
|
-
targetLocation: symbol.
|
|
5112
|
-
referenceVarLocation:
|
|
5128
|
+
targetLocation: symbol.tcbLocation,
|
|
5129
|
+
referenceVarLocation: referenceVarTcbLocation
|
|
5113
5130
|
};
|
|
5114
5131
|
}
|
|
5115
5132
|
}
|
|
@@ -5191,17 +5208,21 @@ var SymbolBuilder = class {
|
|
|
5191
5208
|
} else {
|
|
5192
5209
|
tsSymbol = this.getTypeChecker().getSymbolAtLocation(node);
|
|
5193
5210
|
}
|
|
5194
|
-
const
|
|
5211
|
+
const positionInFile = this.getTcbPositionForNode(node);
|
|
5195
5212
|
const type = this.getTypeChecker().getTypeAtLocation(node);
|
|
5196
5213
|
return {
|
|
5197
5214
|
tsSymbol: (_a = tsSymbol != null ? tsSymbol : type.symbol) != null ? _a : null,
|
|
5198
5215
|
tsType: type,
|
|
5199
|
-
|
|
5216
|
+
tcbLocation: {
|
|
5217
|
+
tcbPath: this.tcbPath,
|
|
5218
|
+
isShimFile: this.tcbIsShim,
|
|
5219
|
+
positionInFile
|
|
5220
|
+
}
|
|
5200
5221
|
};
|
|
5201
5222
|
}
|
|
5202
|
-
|
|
5223
|
+
getTcbPositionForNode(node) {
|
|
5203
5224
|
if (ts27.isTypeReferenceNode(node)) {
|
|
5204
|
-
return this.
|
|
5225
|
+
return this.getTcbPositionForNode(node.typeName);
|
|
5205
5226
|
} else if (ts27.isQualifiedName(node)) {
|
|
5206
5227
|
return node.right.getStart();
|
|
5207
5228
|
} else if (ts27.isPropertyAccessExpression(node)) {
|
|
@@ -5256,7 +5277,7 @@ var TemplateTypeCheckerImpl = class {
|
|
|
5256
5277
|
const shimPath = TypeCheckShimGenerator.shimFor(sfPath);
|
|
5257
5278
|
const fileRecord = this.getFileData(sfPath);
|
|
5258
5279
|
if (!fileRecord.shimData.has(shimPath)) {
|
|
5259
|
-
return { data: null, tcb: null, shimPath };
|
|
5280
|
+
return { data: null, tcb: null, tcbPath: shimPath, tcbIsShim: true };
|
|
5260
5281
|
}
|
|
5261
5282
|
const templateId = fileRecord.sourceManager.getTemplateId(component);
|
|
5262
5283
|
const shimRecord = fileRecord.shimData.get(shimPath);
|
|
@@ -5267,19 +5288,38 @@ var TemplateTypeCheckerImpl = class {
|
|
|
5267
5288
|
throw new Error(`Error: no shim file in program: ${shimPath}`);
|
|
5268
5289
|
}
|
|
5269
5290
|
let tcb = findTypeCheckBlock(shimSf, id, false);
|
|
5291
|
+
let tcbPath = shimPath;
|
|
5270
5292
|
if (tcb === null) {
|
|
5271
5293
|
const inlineSf = getSourceFileOrError(program, sfPath);
|
|
5272
5294
|
tcb = findTypeCheckBlock(inlineSf, id, false);
|
|
5295
|
+
if (tcb !== null) {
|
|
5296
|
+
tcbPath = sfPath;
|
|
5297
|
+
}
|
|
5273
5298
|
}
|
|
5274
5299
|
let data = null;
|
|
5275
5300
|
if (shimRecord.templates.has(templateId)) {
|
|
5276
5301
|
data = shimRecord.templates.get(templateId);
|
|
5277
5302
|
}
|
|
5278
|
-
return { data, tcb, shimPath };
|
|
5303
|
+
return { data, tcb, tcbPath, tcbIsShim: tcbPath === shimPath };
|
|
5279
5304
|
}
|
|
5280
5305
|
isTrackedTypeCheckFile(filePath) {
|
|
5281
5306
|
return this.getFileAndShimRecordsForPath(filePath) !== null;
|
|
5282
5307
|
}
|
|
5308
|
+
getFileRecordForTcbLocation({ tcbPath, isShimFile }) {
|
|
5309
|
+
if (!isShimFile) {
|
|
5310
|
+
if (this.state.has(tcbPath)) {
|
|
5311
|
+
return this.state.get(tcbPath);
|
|
5312
|
+
} else {
|
|
5313
|
+
return null;
|
|
5314
|
+
}
|
|
5315
|
+
}
|
|
5316
|
+
const records = this.getFileAndShimRecordsForPath(tcbPath);
|
|
5317
|
+
if (records !== null) {
|
|
5318
|
+
return records.fileRecord;
|
|
5319
|
+
} else {
|
|
5320
|
+
return null;
|
|
5321
|
+
}
|
|
5322
|
+
}
|
|
5283
5323
|
getFileAndShimRecordsForPath(shimPath) {
|
|
5284
5324
|
for (const fileRecord of this.state.values()) {
|
|
5285
5325
|
if (fileRecord.shimData.has(shimPath)) {
|
|
@@ -5288,17 +5328,16 @@ var TemplateTypeCheckerImpl = class {
|
|
|
5288
5328
|
}
|
|
5289
5329
|
return null;
|
|
5290
5330
|
}
|
|
5291
|
-
|
|
5292
|
-
const
|
|
5293
|
-
if (
|
|
5331
|
+
getTemplateMappingAtTcbLocation(tcbLocation) {
|
|
5332
|
+
const fileRecord = this.getFileRecordForTcbLocation(tcbLocation);
|
|
5333
|
+
if (fileRecord === null) {
|
|
5294
5334
|
return null;
|
|
5295
5335
|
}
|
|
5296
|
-
const
|
|
5297
|
-
const shimSf = this.programDriver.getProgram().getSourceFile(absoluteFrom(shimPath));
|
|
5336
|
+
const shimSf = this.programDriver.getProgram().getSourceFile(tcbLocation.tcbPath);
|
|
5298
5337
|
if (shimSf === void 0) {
|
|
5299
5338
|
return null;
|
|
5300
5339
|
}
|
|
5301
|
-
return getTemplateMapping(shimSf,
|
|
5340
|
+
return getTemplateMapping(shimSf, tcbLocation.positionInFile, fileRecord.sourceManager, false);
|
|
5302
5341
|
}
|
|
5303
5342
|
generateAllTypeCheckBlocks() {
|
|
5304
5343
|
this.ensureAllShimsForAllFiles();
|
|
@@ -5410,11 +5449,11 @@ var TemplateTypeCheckerImpl = class {
|
|
|
5410
5449
|
if (this.completionCache.has(component)) {
|
|
5411
5450
|
return this.completionCache.get(component);
|
|
5412
5451
|
}
|
|
5413
|
-
const { tcb, data,
|
|
5452
|
+
const { tcb, data, tcbPath, tcbIsShim } = this.getLatestComponentState(component);
|
|
5414
5453
|
if (tcb === null || data === null) {
|
|
5415
5454
|
return null;
|
|
5416
5455
|
}
|
|
5417
|
-
const engine = new CompletionEngine(tcb, data,
|
|
5456
|
+
const engine = new CompletionEngine(tcb, data, tcbPath, tcbIsShim);
|
|
5418
5457
|
this.completionCache.set(component, engine);
|
|
5419
5458
|
return engine;
|
|
5420
5459
|
}
|
|
@@ -5538,11 +5577,11 @@ var TemplateTypeCheckerImpl = class {
|
|
|
5538
5577
|
if (this.symbolBuilderCache.has(component)) {
|
|
5539
5578
|
return this.symbolBuilderCache.get(component);
|
|
5540
5579
|
}
|
|
5541
|
-
const { tcb, data,
|
|
5580
|
+
const { tcb, data, tcbPath, tcbIsShim } = this.getLatestComponentState(component);
|
|
5542
5581
|
if (tcb === null || data === null) {
|
|
5543
5582
|
return null;
|
|
5544
5583
|
}
|
|
5545
|
-
const builder = new SymbolBuilder(
|
|
5584
|
+
const builder = new SymbolBuilder(tcbPath, tcbIsShim, tcb, data, this.componentScopeReader, () => this.programDriver.getProgram().getTypeChecker());
|
|
5546
5585
|
this.symbolBuilderCache.set(component, builder);
|
|
5547
5586
|
return builder;
|
|
5548
5587
|
}
|
|
@@ -5866,8 +5905,11 @@ var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
|
5866
5905
|
if (symbol.kind !== SymbolKind.Expression) {
|
|
5867
5906
|
return [];
|
|
5868
5907
|
}
|
|
5869
|
-
const
|
|
5870
|
-
|
|
5908
|
+
const templateMapping = ctx.templateTypeChecker.getTemplateMappingAtTcbLocation(symbol.tcbLocation);
|
|
5909
|
+
if (templateMapping === null) {
|
|
5910
|
+
return [];
|
|
5911
|
+
}
|
|
5912
|
+
const diagnostic = ctx.makeTemplateDiagnostic(templateMapping.span, `The left side of this nullish coalescing operation does not include 'null' or 'undefined' in its type, therefore the '??' operator can be safely removed.`);
|
|
5871
5913
|
return [diagnostic];
|
|
5872
5914
|
}
|
|
5873
5915
|
};
|
|
@@ -7231,4 +7273,4 @@ export {
|
|
|
7231
7273
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7232
7274
|
* found in the LICENSE file at https://angular.io/license
|
|
7233
7275
|
*/
|
|
7234
|
-
//# sourceMappingURL=chunk-
|
|
7276
|
+
//# sourceMappingURL=chunk-6DYPLTK7.js.map
|