@angular/core 19.0.0-rc.0 → 19.0.0-rc.2
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/fesm2022/core.mjs +13699 -13802
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +2 -2
- package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/primitives/signals.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +6 -6
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +28 -62
- package/package.json +1 -1
- package/primitives/event-dispatch/index.d.ts +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/bundles/{checker-2451e7c5.js → checker-cd95ebda.js} +191 -169
- package/schematics/bundles/combine_units-528c4a5d.js +1703 -0
- package/schematics/bundles/{compiler_host-f54f8309.js → compiler_host-40e8d55f.js} +8 -5
- package/schematics/bundles/control-flow-migration.js +3 -3
- package/schematics/bundles/explicit-standalone-flag.js +5 -5
- package/schematics/bundles/{imports-44987700.js → imports-4ac08251.js} +1 -1
- package/schematics/bundles/inject-migration.js +131 -37
- package/schematics/bundles/{leading_space-6e7a8ec6.js → leading_space-d190b83b.js} +1 -1
- package/schematics/bundles/{migrate_ts_type_references-ab18a7c3.js → migrate_ts_type_references-0bcee7cb.js} +528 -32
- package/schematics/bundles/{ng_decorators-3ad437d2.js → nodes-0e7d45ca.js} +15 -2
- package/schematics/bundles/output-migration.js +30 -6906
- package/schematics/bundles/pending-tasks.js +5 -5
- package/schematics/bundles/{program-58424797.js → program-8f30df93.js} +119 -59
- package/schematics/bundles/{project_tsconfig_paths-6c9cde78.js → project_tsconfig_paths-e9ccccbf.js} +1 -1
- package/schematics/bundles/provide-initializer.js +17 -28
- package/schematics/bundles/route-lazy-loading.js +10 -5
- package/schematics/bundles/signal-input-migration.js +50 -37
- package/schematics/bundles/signal-queries-migration.js +26 -19
- package/schematics/bundles/signals.js +7 -7
- package/schematics/bundles/standalone-migration.js +167 -84
- package/schematics/migrations.json +1 -1
- package/schematics/ng-generate/signals/schema.json +1 -0
- package/testing/index.d.ts +1 -1
- package/schematics/bundles/combine_units-c52492ab.js +0 -31202
- package/schematics/bundles/nodes-ffdce442.js +0 -27
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.0.0-rc.
|
|
3
|
+
* @license Angular v19.0.0-rc.2
|
|
4
4
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -896,12 +896,12 @@ const STRING_TYPE = new BuiltinType(BuiltinTypeName.String);
|
|
|
896
896
|
new BuiltinType(BuiltinTypeName.Function);
|
|
897
897
|
const NONE_TYPE = new BuiltinType(BuiltinTypeName.None);
|
|
898
898
|
///// Expressions
|
|
899
|
-
|
|
899
|
+
var UnaryOperator;
|
|
900
900
|
(function (UnaryOperator) {
|
|
901
901
|
UnaryOperator[UnaryOperator["Minus"] = 0] = "Minus";
|
|
902
902
|
UnaryOperator[UnaryOperator["Plus"] = 1] = "Plus";
|
|
903
|
-
})(
|
|
904
|
-
|
|
903
|
+
})(UnaryOperator || (UnaryOperator = {}));
|
|
904
|
+
var BinaryOperator;
|
|
905
905
|
(function (BinaryOperator) {
|
|
906
906
|
BinaryOperator[BinaryOperator["Equals"] = 0] = "Equals";
|
|
907
907
|
BinaryOperator[BinaryOperator["NotEquals"] = 1] = "NotEquals";
|
|
@@ -921,7 +921,7 @@ exports.BinaryOperator = void 0;
|
|
|
921
921
|
BinaryOperator[BinaryOperator["Bigger"] = 15] = "Bigger";
|
|
922
922
|
BinaryOperator[BinaryOperator["BiggerEquals"] = 16] = "BiggerEquals";
|
|
923
923
|
BinaryOperator[BinaryOperator["NullishCoalesce"] = 17] = "NullishCoalesce";
|
|
924
|
-
})(
|
|
924
|
+
})(BinaryOperator || (BinaryOperator = {}));
|
|
925
925
|
function nullSafeIsEquivalent(base, other) {
|
|
926
926
|
if (base == null || other == null) {
|
|
927
927
|
return base == other;
|
|
@@ -966,55 +966,55 @@ class Expression {
|
|
|
966
966
|
return new ConditionalExpr(this, trueCase, falseCase, null, sourceSpan);
|
|
967
967
|
}
|
|
968
968
|
equals(rhs, sourceSpan) {
|
|
969
|
-
return new BinaryOperatorExpr(
|
|
969
|
+
return new BinaryOperatorExpr(BinaryOperator.Equals, this, rhs, null, sourceSpan);
|
|
970
970
|
}
|
|
971
971
|
notEquals(rhs, sourceSpan) {
|
|
972
|
-
return new BinaryOperatorExpr(
|
|
972
|
+
return new BinaryOperatorExpr(BinaryOperator.NotEquals, this, rhs, null, sourceSpan);
|
|
973
973
|
}
|
|
974
974
|
identical(rhs, sourceSpan) {
|
|
975
|
-
return new BinaryOperatorExpr(
|
|
975
|
+
return new BinaryOperatorExpr(BinaryOperator.Identical, this, rhs, null, sourceSpan);
|
|
976
976
|
}
|
|
977
977
|
notIdentical(rhs, sourceSpan) {
|
|
978
|
-
return new BinaryOperatorExpr(
|
|
978
|
+
return new BinaryOperatorExpr(BinaryOperator.NotIdentical, this, rhs, null, sourceSpan);
|
|
979
979
|
}
|
|
980
980
|
minus(rhs, sourceSpan) {
|
|
981
|
-
return new BinaryOperatorExpr(
|
|
981
|
+
return new BinaryOperatorExpr(BinaryOperator.Minus, this, rhs, null, sourceSpan);
|
|
982
982
|
}
|
|
983
983
|
plus(rhs, sourceSpan) {
|
|
984
|
-
return new BinaryOperatorExpr(
|
|
984
|
+
return new BinaryOperatorExpr(BinaryOperator.Plus, this, rhs, null, sourceSpan);
|
|
985
985
|
}
|
|
986
986
|
divide(rhs, sourceSpan) {
|
|
987
|
-
return new BinaryOperatorExpr(
|
|
987
|
+
return new BinaryOperatorExpr(BinaryOperator.Divide, this, rhs, null, sourceSpan);
|
|
988
988
|
}
|
|
989
989
|
multiply(rhs, sourceSpan) {
|
|
990
|
-
return new BinaryOperatorExpr(
|
|
990
|
+
return new BinaryOperatorExpr(BinaryOperator.Multiply, this, rhs, null, sourceSpan);
|
|
991
991
|
}
|
|
992
992
|
modulo(rhs, sourceSpan) {
|
|
993
|
-
return new BinaryOperatorExpr(
|
|
993
|
+
return new BinaryOperatorExpr(BinaryOperator.Modulo, this, rhs, null, sourceSpan);
|
|
994
994
|
}
|
|
995
995
|
and(rhs, sourceSpan) {
|
|
996
|
-
return new BinaryOperatorExpr(
|
|
996
|
+
return new BinaryOperatorExpr(BinaryOperator.And, this, rhs, null, sourceSpan);
|
|
997
997
|
}
|
|
998
998
|
bitwiseOr(rhs, sourceSpan, parens = true) {
|
|
999
|
-
return new BinaryOperatorExpr(
|
|
999
|
+
return new BinaryOperatorExpr(BinaryOperator.BitwiseOr, this, rhs, null, sourceSpan, parens);
|
|
1000
1000
|
}
|
|
1001
1001
|
bitwiseAnd(rhs, sourceSpan, parens = true) {
|
|
1002
|
-
return new BinaryOperatorExpr(
|
|
1002
|
+
return new BinaryOperatorExpr(BinaryOperator.BitwiseAnd, this, rhs, null, sourceSpan, parens);
|
|
1003
1003
|
}
|
|
1004
1004
|
or(rhs, sourceSpan) {
|
|
1005
|
-
return new BinaryOperatorExpr(
|
|
1005
|
+
return new BinaryOperatorExpr(BinaryOperator.Or, this, rhs, null, sourceSpan);
|
|
1006
1006
|
}
|
|
1007
1007
|
lower(rhs, sourceSpan) {
|
|
1008
|
-
return new BinaryOperatorExpr(
|
|
1008
|
+
return new BinaryOperatorExpr(BinaryOperator.Lower, this, rhs, null, sourceSpan);
|
|
1009
1009
|
}
|
|
1010
1010
|
lowerEquals(rhs, sourceSpan) {
|
|
1011
|
-
return new BinaryOperatorExpr(
|
|
1011
|
+
return new BinaryOperatorExpr(BinaryOperator.LowerEquals, this, rhs, null, sourceSpan);
|
|
1012
1012
|
}
|
|
1013
1013
|
bigger(rhs, sourceSpan) {
|
|
1014
|
-
return new BinaryOperatorExpr(
|
|
1014
|
+
return new BinaryOperatorExpr(BinaryOperator.Bigger, this, rhs, null, sourceSpan);
|
|
1015
1015
|
}
|
|
1016
1016
|
biggerEquals(rhs, sourceSpan) {
|
|
1017
|
-
return new BinaryOperatorExpr(
|
|
1017
|
+
return new BinaryOperatorExpr(BinaryOperator.BiggerEquals, this, rhs, null, sourceSpan);
|
|
1018
1018
|
}
|
|
1019
1019
|
isBlank(sourceSpan) {
|
|
1020
1020
|
// Note: We use equals by purpose here to compare to null and undefined in JS.
|
|
@@ -1022,7 +1022,7 @@ class Expression {
|
|
|
1022
1022
|
return this.equals(TYPED_NULL_EXPR, sourceSpan);
|
|
1023
1023
|
}
|
|
1024
1024
|
nullishCoalesce(rhs, sourceSpan) {
|
|
1025
|
-
return new BinaryOperatorExpr(
|
|
1025
|
+
return new BinaryOperatorExpr(BinaryOperator.NullishCoalesce, this, rhs, null, sourceSpan);
|
|
1026
1026
|
}
|
|
1027
1027
|
toStmt() {
|
|
1028
1028
|
return new ExpressionStatement(this, null);
|
|
@@ -1444,8 +1444,7 @@ class ExternalExpr extends Expression {
|
|
|
1444
1444
|
isEquivalent(e) {
|
|
1445
1445
|
return (e instanceof ExternalExpr &&
|
|
1446
1446
|
this.value.name === e.value.name &&
|
|
1447
|
-
this.value.moduleName === e.value.moduleName
|
|
1448
|
-
this.value.runtime === e.value.runtime);
|
|
1447
|
+
this.value.moduleName === e.value.moduleName);
|
|
1449
1448
|
}
|
|
1450
1449
|
isConstant() {
|
|
1451
1450
|
return false;
|
|
@@ -1460,11 +1459,9 @@ class ExternalExpr extends Expression {
|
|
|
1460
1459
|
class ExternalReference {
|
|
1461
1460
|
moduleName;
|
|
1462
1461
|
name;
|
|
1463
|
-
|
|
1464
|
-
constructor(moduleName, name, runtime) {
|
|
1462
|
+
constructor(moduleName, name) {
|
|
1465
1463
|
this.moduleName = moduleName;
|
|
1466
1464
|
this.name = name;
|
|
1467
|
-
this.runtime = runtime;
|
|
1468
1465
|
}
|
|
1469
1466
|
}
|
|
1470
1467
|
class ConditionalExpr extends Expression {
|
|
@@ -3536,10 +3533,10 @@ class AbstractEmitterVisitor {
|
|
|
3536
3533
|
visitUnaryOperatorExpr(ast, ctx) {
|
|
3537
3534
|
let opStr;
|
|
3538
3535
|
switch (ast.operator) {
|
|
3539
|
-
case
|
|
3536
|
+
case UnaryOperator.Plus:
|
|
3540
3537
|
opStr = '+';
|
|
3541
3538
|
break;
|
|
3542
|
-
case
|
|
3539
|
+
case UnaryOperator.Minus:
|
|
3543
3540
|
opStr = '-';
|
|
3544
3541
|
break;
|
|
3545
3542
|
default:
|
|
@@ -3556,58 +3553,58 @@ class AbstractEmitterVisitor {
|
|
|
3556
3553
|
visitBinaryOperatorExpr(ast, ctx) {
|
|
3557
3554
|
let opStr;
|
|
3558
3555
|
switch (ast.operator) {
|
|
3559
|
-
case
|
|
3556
|
+
case BinaryOperator.Equals:
|
|
3560
3557
|
opStr = '==';
|
|
3561
3558
|
break;
|
|
3562
|
-
case
|
|
3559
|
+
case BinaryOperator.Identical:
|
|
3563
3560
|
opStr = '===';
|
|
3564
3561
|
break;
|
|
3565
|
-
case
|
|
3562
|
+
case BinaryOperator.NotEquals:
|
|
3566
3563
|
opStr = '!=';
|
|
3567
3564
|
break;
|
|
3568
|
-
case
|
|
3565
|
+
case BinaryOperator.NotIdentical:
|
|
3569
3566
|
opStr = '!==';
|
|
3570
3567
|
break;
|
|
3571
|
-
case
|
|
3568
|
+
case BinaryOperator.And:
|
|
3572
3569
|
opStr = '&&';
|
|
3573
3570
|
break;
|
|
3574
|
-
case
|
|
3571
|
+
case BinaryOperator.BitwiseOr:
|
|
3575
3572
|
opStr = '|';
|
|
3576
3573
|
break;
|
|
3577
|
-
case
|
|
3574
|
+
case BinaryOperator.BitwiseAnd:
|
|
3578
3575
|
opStr = '&';
|
|
3579
3576
|
break;
|
|
3580
|
-
case
|
|
3577
|
+
case BinaryOperator.Or:
|
|
3581
3578
|
opStr = '||';
|
|
3582
3579
|
break;
|
|
3583
|
-
case
|
|
3580
|
+
case BinaryOperator.Plus:
|
|
3584
3581
|
opStr = '+';
|
|
3585
3582
|
break;
|
|
3586
|
-
case
|
|
3583
|
+
case BinaryOperator.Minus:
|
|
3587
3584
|
opStr = '-';
|
|
3588
3585
|
break;
|
|
3589
|
-
case
|
|
3586
|
+
case BinaryOperator.Divide:
|
|
3590
3587
|
opStr = '/';
|
|
3591
3588
|
break;
|
|
3592
|
-
case
|
|
3589
|
+
case BinaryOperator.Multiply:
|
|
3593
3590
|
opStr = '*';
|
|
3594
3591
|
break;
|
|
3595
|
-
case
|
|
3592
|
+
case BinaryOperator.Modulo:
|
|
3596
3593
|
opStr = '%';
|
|
3597
3594
|
break;
|
|
3598
|
-
case
|
|
3595
|
+
case BinaryOperator.Lower:
|
|
3599
3596
|
opStr = '<';
|
|
3600
3597
|
break;
|
|
3601
|
-
case
|
|
3598
|
+
case BinaryOperator.LowerEquals:
|
|
3602
3599
|
opStr = '<=';
|
|
3603
3600
|
break;
|
|
3604
|
-
case
|
|
3601
|
+
case BinaryOperator.Bigger:
|
|
3605
3602
|
opStr = '>';
|
|
3606
3603
|
break;
|
|
3607
|
-
case
|
|
3604
|
+
case BinaryOperator.BiggerEquals:
|
|
3608
3605
|
opStr = '>=';
|
|
3609
3606
|
break;
|
|
3610
|
-
case
|
|
3607
|
+
case BinaryOperator.NullishCoalesce:
|
|
3611
3608
|
opStr = '??';
|
|
3612
3609
|
break;
|
|
3613
3610
|
default:
|
|
@@ -3739,11 +3736,11 @@ function devOnlyGuardedExpression(expr) {
|
|
|
3739
3736
|
}
|
|
3740
3737
|
function guardedExpression(guard, expr) {
|
|
3741
3738
|
const guardExpr = new ExternalExpr({ name: guard, moduleName: null });
|
|
3742
|
-
const guardNotDefined = new BinaryOperatorExpr(
|
|
3743
|
-
const guardUndefinedOrTrue = new BinaryOperatorExpr(
|
|
3739
|
+
const guardNotDefined = new BinaryOperatorExpr(BinaryOperator.Identical, new TypeofExpr(guardExpr), literal$1('undefined'));
|
|
3740
|
+
const guardUndefinedOrTrue = new BinaryOperatorExpr(BinaryOperator.Or, guardNotDefined, guardExpr,
|
|
3744
3741
|
/* type */ undefined,
|
|
3745
3742
|
/* sourceSpan */ undefined, true);
|
|
3746
|
-
return new BinaryOperatorExpr(
|
|
3743
|
+
return new BinaryOperatorExpr(BinaryOperator.And, guardUndefinedOrTrue, expr);
|
|
3747
3744
|
}
|
|
3748
3745
|
function wrapReference(value) {
|
|
3749
3746
|
const wrapped = new WrappedNodeExpr(value);
|
|
@@ -3812,7 +3809,7 @@ function compileFactoryFunction(meta) {
|
|
|
3812
3809
|
// delegated factory (which is used to create the current type) then this is only the type-to-
|
|
3813
3810
|
// create parameter (t).
|
|
3814
3811
|
const typeForCtor = !isDelegatedFactoryMetadata(meta)
|
|
3815
|
-
? new BinaryOperatorExpr(
|
|
3812
|
+
? new BinaryOperatorExpr(BinaryOperator.Or, t, meta.type.value)
|
|
3816
3813
|
: t;
|
|
3817
3814
|
let ctorExpr = null;
|
|
3818
3815
|
if (meta.deps !== null) {
|
|
@@ -3860,7 +3857,7 @@ function compileFactoryFunction(meta) {
|
|
|
3860
3857
|
// This factory uses a base factory, so call `ɵɵgetInheritedFactory()` to compute it.
|
|
3861
3858
|
const getInheritedFactoryCall = importExpr(Identifiers.getInheritedFactory).callFn([meta.type.value]);
|
|
3862
3859
|
// Memoize the base factoryFn: `baseFactory || (baseFactory = ɵɵgetInheritedFactory(...))`
|
|
3863
|
-
const baseFactory = new BinaryOperatorExpr(
|
|
3860
|
+
const baseFactory = new BinaryOperatorExpr(BinaryOperator.Or, baseFactoryVar, baseFactoryVar.set(getInheritedFactoryCall));
|
|
3864
3861
|
body.push(new ReturnStatement(baseFactory.callFn([typeForCtor])));
|
|
3865
3862
|
}
|
|
3866
3863
|
else {
|
|
@@ -11518,7 +11515,7 @@ function generateConditionalExpressions(job) {
|
|
|
11518
11515
|
}
|
|
11519
11516
|
if (tmp !== null) {
|
|
11520
11517
|
const useTmp = i === 0 ? tmp : new ReadTemporaryExpr(tmp.xref);
|
|
11521
|
-
conditionalCase.expr = new BinaryOperatorExpr(
|
|
11518
|
+
conditionalCase.expr = new BinaryOperatorExpr(BinaryOperator.Identical, useTmp, conditionalCase.expr);
|
|
11522
11519
|
}
|
|
11523
11520
|
else if (conditionalCase.alias !== null) {
|
|
11524
11521
|
const caseExpressionTemporaryXref = job.allocateXrefId();
|
|
@@ -11537,24 +11534,24 @@ function generateConditionalExpressions(job) {
|
|
|
11537
11534
|
}
|
|
11538
11535
|
|
|
11539
11536
|
const BINARY_OPERATORS$3 = new Map([
|
|
11540
|
-
['&&',
|
|
11541
|
-
['>',
|
|
11542
|
-
['>=',
|
|
11543
|
-
['|',
|
|
11544
|
-
['&',
|
|
11545
|
-
['/',
|
|
11546
|
-
['==',
|
|
11547
|
-
['===',
|
|
11548
|
-
['<',
|
|
11549
|
-
['<=',
|
|
11550
|
-
['-',
|
|
11551
|
-
['%',
|
|
11552
|
-
['*',
|
|
11553
|
-
['!=',
|
|
11554
|
-
['!==',
|
|
11555
|
-
['??',
|
|
11556
|
-
['||',
|
|
11557
|
-
['+',
|
|
11537
|
+
['&&', BinaryOperator.And],
|
|
11538
|
+
['>', BinaryOperator.Bigger],
|
|
11539
|
+
['>=', BinaryOperator.BiggerEquals],
|
|
11540
|
+
['|', BinaryOperator.BitwiseOr],
|
|
11541
|
+
['&', BinaryOperator.BitwiseAnd],
|
|
11542
|
+
['/', BinaryOperator.Divide],
|
|
11543
|
+
['==', BinaryOperator.Equals],
|
|
11544
|
+
['===', BinaryOperator.Identical],
|
|
11545
|
+
['<', BinaryOperator.Lower],
|
|
11546
|
+
['<=', BinaryOperator.LowerEquals],
|
|
11547
|
+
['-', BinaryOperator.Minus],
|
|
11548
|
+
['%', BinaryOperator.Modulo],
|
|
11549
|
+
['*', BinaryOperator.Multiply],
|
|
11550
|
+
['!=', BinaryOperator.NotEquals],
|
|
11551
|
+
['!==', BinaryOperator.NotIdentical],
|
|
11552
|
+
['??', BinaryOperator.NullishCoalesce],
|
|
11553
|
+
['||', BinaryOperator.Or],
|
|
11554
|
+
['+', BinaryOperator.Plus],
|
|
11558
11555
|
]);
|
|
11559
11556
|
function namespaceForKey(namespacePrefixKey) {
|
|
11560
11557
|
const NAMESPACES = new Map([
|
|
@@ -12330,7 +12327,7 @@ function ternaryTransform(e) {
|
|
|
12330
12327
|
if (!(e instanceof SafeTernaryExpr)) {
|
|
12331
12328
|
return e;
|
|
12332
12329
|
}
|
|
12333
|
-
return new ConditionalExpr(new BinaryOperatorExpr(
|
|
12330
|
+
return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);
|
|
12334
12331
|
}
|
|
12335
12332
|
|
|
12336
12333
|
/**
|
|
@@ -21524,14 +21521,14 @@ function generateNullishCoalesceExpressions(job) {
|
|
|
21524
21521
|
for (const op of unit.ops()) {
|
|
21525
21522
|
transformExpressionsInOp(op, (expr) => {
|
|
21526
21523
|
if (!(expr instanceof BinaryOperatorExpr) ||
|
|
21527
|
-
expr.operator !==
|
|
21524
|
+
expr.operator !== BinaryOperator.NullishCoalesce) {
|
|
21528
21525
|
return expr;
|
|
21529
21526
|
}
|
|
21530
21527
|
const assignment = new AssignTemporaryExpr(expr.lhs.clone(), job.allocateXrefId());
|
|
21531
21528
|
const read = new ReadTemporaryExpr(assignment.xref);
|
|
21532
21529
|
// TODO: When not in compatibility mode for TemplateDefinitionBuilder, we can just emit
|
|
21533
21530
|
// `t != null` instead of including an undefined check as well.
|
|
21534
|
-
return new ConditionalExpr(new BinaryOperatorExpr(
|
|
21531
|
+
return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.And, new BinaryOperatorExpr(BinaryOperator.NotIdentical, assignment, NULL_EXPR), new BinaryOperatorExpr(BinaryOperator.NotIdentical, read, new LiteralExpr(undefined))), read.clone(), expr.rhs);
|
|
21535
21532
|
}, VisitorContextFlag.None);
|
|
21536
21533
|
}
|
|
21537
21534
|
}
|
|
@@ -24862,7 +24859,7 @@ function maybeGenerateRfBlock(flag, statements) {
|
|
|
24862
24859
|
return [];
|
|
24863
24860
|
}
|
|
24864
24861
|
return [
|
|
24865
|
-
ifStmt(new BinaryOperatorExpr(
|
|
24862
|
+
ifStmt(new BinaryOperatorExpr(BinaryOperator.BitwiseAnd, variable('rf'), literal$1(flag)), statements),
|
|
24866
24863
|
];
|
|
24867
24864
|
}
|
|
24868
24865
|
function emitHostBindingFunction(job) {
|
|
@@ -25483,9 +25480,9 @@ function convertAst(ast, job, baseSourceSpan) {
|
|
|
25483
25480
|
else if (ast instanceof Unary) {
|
|
25484
25481
|
switch (ast.operator) {
|
|
25485
25482
|
case '+':
|
|
25486
|
-
return new UnaryOperatorExpr(
|
|
25483
|
+
return new UnaryOperatorExpr(UnaryOperator.Plus, convertAst(ast.expr, job, baseSourceSpan), undefined, convertSourceSpan(ast.span, baseSourceSpan));
|
|
25487
25484
|
case '-':
|
|
25488
|
-
return new UnaryOperatorExpr(
|
|
25485
|
+
return new UnaryOperatorExpr(UnaryOperator.Minus, convertAst(ast.expr, job, baseSourceSpan), undefined, convertSourceSpan(ast.span, baseSourceSpan));
|
|
25489
25486
|
default:
|
|
25490
25487
|
throw new Error(`AssertionError: unknown unary operator ${ast.operator}`);
|
|
25491
25488
|
}
|
|
@@ -25879,15 +25876,16 @@ function convertSourceSpan(span, baseSourceSpan) {
|
|
|
25879
25876
|
* workaround, because it'll include an additional text node as the first child. We can work
|
|
25880
25877
|
* around it here, but in a discussion it was decided not to, because the user explicitly opted
|
|
25881
25878
|
* into preserving the whitespace and we would have to drop it from the generated code.
|
|
25882
|
-
* The diagnostic mentioned point #1 will flag such cases to users.
|
|
25879
|
+
* The diagnostic mentioned point in #1 will flag such cases to users.
|
|
25883
25880
|
*
|
|
25884
25881
|
* @returns Tag name to be used for the control flow template.
|
|
25885
25882
|
*/
|
|
25886
25883
|
function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
25887
25884
|
let root = null;
|
|
25888
25885
|
for (const child of node.children) {
|
|
25889
|
-
// Skip over comment nodes
|
|
25890
|
-
|
|
25886
|
+
// Skip over comment nodes and @let declarations since
|
|
25887
|
+
// it doesn't matter where they end up in the DOM.
|
|
25888
|
+
if (child instanceof Comment$1 || child instanceof LetDeclaration$1) {
|
|
25891
25889
|
continue;
|
|
25892
25890
|
}
|
|
25893
25891
|
// We can only infer the tag name/attributes if there's a single root node.
|
|
@@ -25898,6 +25896,9 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
25898
25896
|
if (child instanceof Element$1 || (child instanceof Template && child.tagName !== null)) {
|
|
25899
25897
|
root = child;
|
|
25900
25898
|
}
|
|
25899
|
+
else {
|
|
25900
|
+
return null;
|
|
25901
|
+
}
|
|
25901
25902
|
}
|
|
25902
25903
|
// If we've found a single root node, its tag name and attributes can be
|
|
25903
25904
|
// copied to the surrounding template to be used for content projection.
|
|
@@ -30277,7 +30278,7 @@ function publishFacade(global) {
|
|
|
30277
30278
|
* @description
|
|
30278
30279
|
* Entry point for all public APIs of the compiler package.
|
|
30279
30280
|
*/
|
|
30280
|
-
new Version('19.0.0-rc.
|
|
30281
|
+
new Version('19.0.0-rc.2');
|
|
30281
30282
|
|
|
30282
30283
|
const _I18N_ATTR = 'i18n';
|
|
30283
30284
|
const _I18N_ATTR_PREFIX = 'i18n-';
|
|
@@ -31685,7 +31686,7 @@ class NodeJSPathManipulation {
|
|
|
31685
31686
|
// G3-ESM-MARKER: G3 uses CommonJS, but externally everything in ESM.
|
|
31686
31687
|
// CommonJS/ESM interop for determining the current file name and containing dir.
|
|
31687
31688
|
const isCommonJS = typeof __filename !== 'undefined';
|
|
31688
|
-
const currentFileUrl = isCommonJS ? null : (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('checker-
|
|
31689
|
+
const currentFileUrl = isCommonJS ? null : (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || new URL('checker-cd95ebda.js', document.baseURI).href));
|
|
31689
31690
|
const currentFileName = isCommonJS ? __filename : url.fileURLToPath(currentFileUrl);
|
|
31690
31691
|
/**
|
|
31691
31692
|
* A wrapper around the Node.js file-system that supports readonly operations and path manipulation.
|
|
@@ -31951,6 +31952,11 @@ exports.ImportFlags = void 0;
|
|
|
31951
31952
|
*/
|
|
31952
31953
|
ImportFlags[ImportFlags["AllowAmbientReferences"] = 16] = "AllowAmbientReferences";
|
|
31953
31954
|
})(exports.ImportFlags || (exports.ImportFlags = {}));
|
|
31955
|
+
exports.ReferenceEmitKind = void 0;
|
|
31956
|
+
(function (ReferenceEmitKind) {
|
|
31957
|
+
ReferenceEmitKind[ReferenceEmitKind["Success"] = 0] = "Success";
|
|
31958
|
+
ReferenceEmitKind[ReferenceEmitKind["Failed"] = 1] = "Failed";
|
|
31959
|
+
})(exports.ReferenceEmitKind || (exports.ReferenceEmitKind = {}));
|
|
31954
31960
|
/**
|
|
31955
31961
|
* Verifies that a reference was emitted successfully, or raises a `FatalDiagnosticError` otherwise.
|
|
31956
31962
|
* @param result The emit result that should have been successful.
|
|
@@ -31959,7 +31965,7 @@ exports.ImportFlags = void 0;
|
|
|
31959
31965
|
* 'class'.
|
|
31960
31966
|
*/
|
|
31961
31967
|
function assertSuccessfulReferenceEmit(result, origin, typeKind) {
|
|
31962
|
-
if (result.kind ===
|
|
31968
|
+
if (result.kind === exports.ReferenceEmitKind.Success) {
|
|
31963
31969
|
return;
|
|
31964
31970
|
}
|
|
31965
31971
|
const message = makeDiagnosticChain(`Unable to import ${typeKind} ${nodeNameForError(result.ref.node)}.`, [makeDiagnosticChain(result.reason)]);
|
|
@@ -31986,7 +31992,7 @@ class ReferenceEmitter {
|
|
|
31986
31992
|
}
|
|
31987
31993
|
}
|
|
31988
31994
|
return {
|
|
31989
|
-
kind:
|
|
31995
|
+
kind: exports.ReferenceEmitKind.Failed,
|
|
31990
31996
|
ref,
|
|
31991
31997
|
context,
|
|
31992
31998
|
reason: `Unable to write a reference to ${nodeNameForError(ref.node)}.`,
|
|
@@ -32012,7 +32018,7 @@ class LocalIdentifierStrategy {
|
|
|
32012
32018
|
// invalid emission of a free-standing `foo` identifier, rather than `exports.foo`.
|
|
32013
32019
|
if (!isDeclaration(ref.node) && refSf === context) {
|
|
32014
32020
|
return {
|
|
32015
|
-
kind:
|
|
32021
|
+
kind: exports.ReferenceEmitKind.Success,
|
|
32016
32022
|
expression: new WrappedNodeExpr(ref.node),
|
|
32017
32023
|
importedFile: null,
|
|
32018
32024
|
};
|
|
@@ -32022,7 +32028,7 @@ class LocalIdentifierStrategy {
|
|
|
32022
32028
|
const identifier = identifierOfNode(ref.node);
|
|
32023
32029
|
if (identifier !== null) {
|
|
32024
32030
|
return {
|
|
32025
|
-
kind:
|
|
32031
|
+
kind: exports.ReferenceEmitKind.Success,
|
|
32026
32032
|
expression: new WrappedNodeExpr(identifier),
|
|
32027
32033
|
importedFile: null,
|
|
32028
32034
|
};
|
|
@@ -32036,7 +32042,7 @@ class LocalIdentifierStrategy {
|
|
|
32036
32042
|
const identifier = ref.getIdentityIn(context);
|
|
32037
32043
|
if (identifier !== null) {
|
|
32038
32044
|
return {
|
|
32039
|
-
kind:
|
|
32045
|
+
kind: exports.ReferenceEmitKind.Success,
|
|
32040
32046
|
expression: new WrappedNodeExpr(identifier),
|
|
32041
32047
|
importedFile: null,
|
|
32042
32048
|
};
|
|
@@ -32089,7 +32095,7 @@ class AbsoluteModuleStrategy {
|
|
|
32089
32095
|
const exports$1 = this.getExportsOfModule(specifier, resolutionContext);
|
|
32090
32096
|
if (exports$1.module === null) {
|
|
32091
32097
|
return {
|
|
32092
|
-
kind:
|
|
32098
|
+
kind: exports.ReferenceEmitKind.Failed,
|
|
32093
32099
|
ref,
|
|
32094
32100
|
context,
|
|
32095
32101
|
reason: `The module '${specifier}' could not be found.`,
|
|
@@ -32097,7 +32103,7 @@ class AbsoluteModuleStrategy {
|
|
|
32097
32103
|
}
|
|
32098
32104
|
else if (exports$1.exportMap === null || !exports$1.exportMap.has(ref.node)) {
|
|
32099
32105
|
return {
|
|
32100
|
-
kind:
|
|
32106
|
+
kind: exports.ReferenceEmitKind.Failed,
|
|
32101
32107
|
ref,
|
|
32102
32108
|
context,
|
|
32103
32109
|
reason: `The symbol is not exported from ${exports$1.module.fileName} (module '${specifier}').`,
|
|
@@ -32105,7 +32111,7 @@ class AbsoluteModuleStrategy {
|
|
|
32105
32111
|
}
|
|
32106
32112
|
const symbolName = exports$1.exportMap.get(ref.node);
|
|
32107
32113
|
return {
|
|
32108
|
-
kind:
|
|
32114
|
+
kind: exports.ReferenceEmitKind.Success,
|
|
32109
32115
|
expression: new ExternalExpr(new ExternalReference(specifier, symbolName)),
|
|
32110
32116
|
importedFile: exports$1.module,
|
|
32111
32117
|
};
|
|
@@ -32176,7 +32182,7 @@ class LogicalProjectStrategy {
|
|
|
32176
32182
|
// Note: this error is analogous to `TS6059: File is not under 'rootDir'` that TypeScript
|
|
32177
32183
|
// reports.
|
|
32178
32184
|
return {
|
|
32179
|
-
kind:
|
|
32185
|
+
kind: exports.ReferenceEmitKind.Failed,
|
|
32180
32186
|
ref,
|
|
32181
32187
|
context,
|
|
32182
32188
|
reason: `The file ${destSf.fileName} is outside of the configured 'rootDir'.`,
|
|
@@ -32194,7 +32200,7 @@ class LogicalProjectStrategy {
|
|
|
32194
32200
|
if (name === null) {
|
|
32195
32201
|
// The target declaration isn't exported from the file it's declared in. This is an issue!
|
|
32196
32202
|
return {
|
|
32197
|
-
kind:
|
|
32203
|
+
kind: exports.ReferenceEmitKind.Failed,
|
|
32198
32204
|
ref,
|
|
32199
32205
|
context,
|
|
32200
32206
|
reason: `The symbol is not exported from ${destSf.fileName}.`,
|
|
@@ -32204,7 +32210,7 @@ class LogicalProjectStrategy {
|
|
|
32204
32210
|
// path is now straightforward.
|
|
32205
32211
|
const moduleName = LogicalProjectPath.relativePathBetween(originPath, destPath);
|
|
32206
32212
|
return {
|
|
32207
|
-
kind:
|
|
32213
|
+
kind: exports.ReferenceEmitKind.Success,
|
|
32208
32214
|
expression: new ExternalExpr({ moduleName, name }),
|
|
32209
32215
|
importedFile: destSf,
|
|
32210
32216
|
};
|
|
@@ -32228,14 +32234,14 @@ class RelativePathStrategy {
|
|
|
32228
32234
|
const name = findExportedNameOfNode(ref.node, destSf, this.reflector);
|
|
32229
32235
|
if (name === null) {
|
|
32230
32236
|
return {
|
|
32231
|
-
kind:
|
|
32237
|
+
kind: exports.ReferenceEmitKind.Failed,
|
|
32232
32238
|
ref,
|
|
32233
32239
|
context,
|
|
32234
32240
|
reason: `The symbol is not exported from ${destSf.fileName}.`,
|
|
32235
32241
|
};
|
|
32236
32242
|
}
|
|
32237
32243
|
return {
|
|
32238
|
-
kind:
|
|
32244
|
+
kind: exports.ReferenceEmitKind.Success,
|
|
32239
32245
|
expression: new ExternalExpr({ moduleName, name }),
|
|
32240
32246
|
importedFile: destSf,
|
|
32241
32247
|
};
|
|
@@ -32260,7 +32266,7 @@ class UnifiedModulesStrategy {
|
|
|
32260
32266
|
}
|
|
32261
32267
|
const moduleName = this.unifiedModulesHost.fileNameToModuleName(destSf.fileName, context.fileName);
|
|
32262
32268
|
return {
|
|
32263
|
-
kind:
|
|
32269
|
+
kind: exports.ReferenceEmitKind.Success,
|
|
32264
32270
|
expression: new ExternalExpr({ moduleName, name }),
|
|
32265
32271
|
importedFile: destSf,
|
|
32266
32272
|
};
|
|
@@ -33176,10 +33182,16 @@ class TypeScriptReflectionHost {
|
|
|
33176
33182
|
: null;
|
|
33177
33183
|
}
|
|
33178
33184
|
}
|
|
33185
|
+
class TypeEntityToDeclarationError extends Error {
|
|
33186
|
+
}
|
|
33187
|
+
/**
|
|
33188
|
+
* @throws {TypeEntityToDeclarationError} if the type cannot be converted
|
|
33189
|
+
* to a declaration.
|
|
33190
|
+
*/
|
|
33179
33191
|
function reflectTypeEntityToDeclaration(type, checker) {
|
|
33180
33192
|
let realSymbol = checker.getSymbolAtLocation(type);
|
|
33181
33193
|
if (realSymbol === undefined) {
|
|
33182
|
-
throw new
|
|
33194
|
+
throw new TypeEntityToDeclarationError(`Cannot resolve type entity ${type.getText()} to symbol`);
|
|
33183
33195
|
}
|
|
33184
33196
|
while (realSymbol.flags & ts__default["default"].SymbolFlags.Alias) {
|
|
33185
33197
|
realSymbol = checker.getAliasedSymbol(realSymbol);
|
|
@@ -33192,24 +33204,24 @@ function reflectTypeEntityToDeclaration(type, checker) {
|
|
|
33192
33204
|
node = realSymbol.declarations[0];
|
|
33193
33205
|
}
|
|
33194
33206
|
else {
|
|
33195
|
-
throw new
|
|
33207
|
+
throw new TypeEntityToDeclarationError(`Cannot resolve type entity symbol to declaration`);
|
|
33196
33208
|
}
|
|
33197
33209
|
if (ts__default["default"].isQualifiedName(type)) {
|
|
33198
33210
|
if (!ts__default["default"].isIdentifier(type.left)) {
|
|
33199
|
-
throw new
|
|
33211
|
+
throw new TypeEntityToDeclarationError(`Cannot handle qualified name with non-identifier lhs`);
|
|
33200
33212
|
}
|
|
33201
33213
|
const symbol = checker.getSymbolAtLocation(type.left);
|
|
33202
33214
|
if (symbol === undefined ||
|
|
33203
33215
|
symbol.declarations === undefined ||
|
|
33204
33216
|
symbol.declarations.length !== 1) {
|
|
33205
|
-
throw new
|
|
33217
|
+
throw new TypeEntityToDeclarationError(`Cannot resolve qualified type entity lhs to symbol`);
|
|
33206
33218
|
}
|
|
33207
33219
|
const decl = symbol.declarations[0];
|
|
33208
33220
|
if (ts__default["default"].isNamespaceImport(decl)) {
|
|
33209
33221
|
const clause = decl.parent;
|
|
33210
33222
|
const importDecl = clause.parent;
|
|
33211
33223
|
if (!ts__default["default"].isStringLiteral(importDecl.moduleSpecifier)) {
|
|
33212
|
-
throw new
|
|
33224
|
+
throw new TypeEntityToDeclarationError(`Module specifier is not a string`);
|
|
33213
33225
|
}
|
|
33214
33226
|
return { node, from: importDecl.moduleSpecifier.text };
|
|
33215
33227
|
}
|
|
@@ -33217,7 +33229,7 @@ function reflectTypeEntityToDeclaration(type, checker) {
|
|
|
33217
33229
|
return { node, from: null };
|
|
33218
33230
|
}
|
|
33219
33231
|
else {
|
|
33220
|
-
throw new
|
|
33232
|
+
throw new TypeEntityToDeclarationError(`Unknown import type?`);
|
|
33221
33233
|
}
|
|
33222
33234
|
}
|
|
33223
33235
|
else {
|
|
@@ -33953,18 +33965,43 @@ exports.MatchSource = void 0;
|
|
|
33953
33965
|
|
|
33954
33966
|
function extractReferencesFromType(checker, def, bestGuessOwningModule) {
|
|
33955
33967
|
if (!ts__default["default"].isTupleTypeNode(def)) {
|
|
33956
|
-
return [];
|
|
33968
|
+
return { result: [], isIncomplete: false };
|
|
33957
33969
|
}
|
|
33958
|
-
|
|
33970
|
+
const result = [];
|
|
33971
|
+
let isIncomplete = false;
|
|
33972
|
+
for (const element of def.elements) {
|
|
33959
33973
|
if (!ts__default["default"].isTypeQueryNode(element)) {
|
|
33960
33974
|
throw new Error(`Expected TypeQueryNode: ${nodeDebugInfo(element)}`);
|
|
33961
33975
|
}
|
|
33962
|
-
|
|
33963
|
-
|
|
33976
|
+
const ref = extraReferenceFromTypeQuery(checker, element, def, bestGuessOwningModule);
|
|
33977
|
+
// Note: Sometimes a reference inside the type tuple/array
|
|
33978
|
+
// may not be resolvable/existent. We proceed with incomplete data.
|
|
33979
|
+
if (ref === null) {
|
|
33980
|
+
isIncomplete = true;
|
|
33981
|
+
}
|
|
33982
|
+
else {
|
|
33983
|
+
result.push(ref);
|
|
33984
|
+
}
|
|
33985
|
+
}
|
|
33986
|
+
return { result, isIncomplete };
|
|
33964
33987
|
}
|
|
33965
33988
|
function extraReferenceFromTypeQuery(checker, typeNode, origin, bestGuessOwningModule) {
|
|
33966
33989
|
const type = typeNode.exprName;
|
|
33967
|
-
|
|
33990
|
+
let node;
|
|
33991
|
+
let from;
|
|
33992
|
+
// Gracefully handle when the type entity could not be converted or
|
|
33993
|
+
// resolved to its declaration node.
|
|
33994
|
+
try {
|
|
33995
|
+
const result = reflectTypeEntityToDeclaration(type, checker);
|
|
33996
|
+
node = result.node;
|
|
33997
|
+
from = result.from;
|
|
33998
|
+
}
|
|
33999
|
+
catch (e) {
|
|
34000
|
+
if (e instanceof TypeEntityToDeclarationError) {
|
|
34001
|
+
return null;
|
|
34002
|
+
}
|
|
34003
|
+
throw e;
|
|
34004
|
+
}
|
|
33968
34005
|
if (!isNamedClassDeclaration(node)) {
|
|
33969
34006
|
throw new Error(`Expected named ClassDeclaration: ${nodeDebugInfo(node)}`);
|
|
33970
34007
|
}
|
|
@@ -36094,28 +36131,28 @@ function createImportReference(asTypeReference, ref) {
|
|
|
36094
36131
|
}
|
|
36095
36132
|
|
|
36096
36133
|
const UNARY_OPERATORS$1 = new Map([
|
|
36097
|
-
[
|
|
36098
|
-
[
|
|
36134
|
+
[UnaryOperator.Minus, '-'],
|
|
36135
|
+
[UnaryOperator.Plus, '+'],
|
|
36099
36136
|
]);
|
|
36100
36137
|
const BINARY_OPERATORS$1 = new Map([
|
|
36101
|
-
[
|
|
36102
|
-
[
|
|
36103
|
-
[
|
|
36104
|
-
[
|
|
36105
|
-
[
|
|
36106
|
-
[
|
|
36107
|
-
[
|
|
36108
|
-
[
|
|
36109
|
-
[
|
|
36110
|
-
[
|
|
36111
|
-
[
|
|
36112
|
-
[
|
|
36113
|
-
[
|
|
36114
|
-
[
|
|
36115
|
-
[
|
|
36116
|
-
[
|
|
36117
|
-
[
|
|
36118
|
-
[
|
|
36138
|
+
[BinaryOperator.And, '&&'],
|
|
36139
|
+
[BinaryOperator.Bigger, '>'],
|
|
36140
|
+
[BinaryOperator.BiggerEquals, '>='],
|
|
36141
|
+
[BinaryOperator.BitwiseAnd, '&'],
|
|
36142
|
+
[BinaryOperator.BitwiseOr, '|'],
|
|
36143
|
+
[BinaryOperator.Divide, '/'],
|
|
36144
|
+
[BinaryOperator.Equals, '=='],
|
|
36145
|
+
[BinaryOperator.Identical, '==='],
|
|
36146
|
+
[BinaryOperator.Lower, '<'],
|
|
36147
|
+
[BinaryOperator.LowerEquals, '<='],
|
|
36148
|
+
[BinaryOperator.Minus, '-'],
|
|
36149
|
+
[BinaryOperator.Modulo, '%'],
|
|
36150
|
+
[BinaryOperator.Multiply, '*'],
|
|
36151
|
+
[BinaryOperator.NotEquals, '!='],
|
|
36152
|
+
[BinaryOperator.NotIdentical, '!=='],
|
|
36153
|
+
[BinaryOperator.Or, '||'],
|
|
36154
|
+
[BinaryOperator.Plus, '+'],
|
|
36155
|
+
[BinaryOperator.NullishCoalesce, '??'],
|
|
36119
36156
|
]);
|
|
36120
36157
|
class ExpressionTranslatorVisitor {
|
|
36121
36158
|
factory;
|
|
@@ -36328,7 +36365,7 @@ class ExpressionTranslatorVisitor {
|
|
|
36328
36365
|
}
|
|
36329
36366
|
visitBinaryOperatorExpr(ast, context) {
|
|
36330
36367
|
if (!BINARY_OPERATORS$1.has(ast.operator)) {
|
|
36331
|
-
throw new Error(`Unknown binary operator: ${
|
|
36368
|
+
throw new Error(`Unknown binary operator: ${BinaryOperator[ast.operator]}`);
|
|
36332
36369
|
}
|
|
36333
36370
|
return this.factory.createBinaryExpression(ast.lhs.visitExpression(this, context), BINARY_OPERATORS$1.get(ast.operator), ast.rhs.visitExpression(this, context));
|
|
36334
36371
|
}
|
|
@@ -36363,7 +36400,7 @@ class ExpressionTranslatorVisitor {
|
|
|
36363
36400
|
}
|
|
36364
36401
|
visitUnaryOperatorExpr(ast, context) {
|
|
36365
36402
|
if (!UNARY_OPERATORS$1.has(ast.operator)) {
|
|
36366
|
-
throw new Error(`Unknown unary operator: ${
|
|
36403
|
+
throw new Error(`Unknown unary operator: ${UnaryOperator[ast.operator]}`);
|
|
36367
36404
|
}
|
|
36368
36405
|
return this.factory.createUnaryExpression(UNARY_OPERATORS$1.get(ast.operator), ast.expr.visitExpression(this, context));
|
|
36369
36406
|
}
|
|
@@ -38580,27 +38617,6 @@ class Mappings {
|
|
|
38580
38617
|
let charInHiresBoundary = false;
|
|
38581
38618
|
|
|
38582
38619
|
while (originalCharIndex < chunk.end) {
|
|
38583
|
-
if (this.hires || first || sourcemapLocations.has(originalCharIndex)) {
|
|
38584
|
-
const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
|
|
38585
|
-
|
|
38586
|
-
if (this.hires === 'boundary') {
|
|
38587
|
-
// in hires "boundary", group segments per word boundary than per char
|
|
38588
|
-
if (wordRegex.test(original[originalCharIndex])) {
|
|
38589
|
-
// for first char in the boundary found, start the boundary by pushing a segment
|
|
38590
|
-
if (!charInHiresBoundary) {
|
|
38591
|
-
this.rawSegments.push(segment);
|
|
38592
|
-
charInHiresBoundary = true;
|
|
38593
|
-
}
|
|
38594
|
-
} else {
|
|
38595
|
-
// for non-word char, end the boundary by pushing a segment
|
|
38596
|
-
this.rawSegments.push(segment);
|
|
38597
|
-
charInHiresBoundary = false;
|
|
38598
|
-
}
|
|
38599
|
-
} else {
|
|
38600
|
-
this.rawSegments.push(segment);
|
|
38601
|
-
}
|
|
38602
|
-
}
|
|
38603
|
-
|
|
38604
38620
|
if (original[originalCharIndex] === '\n') {
|
|
38605
38621
|
loc.line += 1;
|
|
38606
38622
|
loc.column = 0;
|
|
@@ -38609,6 +38625,27 @@ class Mappings {
|
|
|
38609
38625
|
this.generatedCodeColumn = 0;
|
|
38610
38626
|
first = true;
|
|
38611
38627
|
} else {
|
|
38628
|
+
if (this.hires || first || sourcemapLocations.has(originalCharIndex)) {
|
|
38629
|
+
const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
|
|
38630
|
+
|
|
38631
|
+
if (this.hires === 'boundary') {
|
|
38632
|
+
// in hires "boundary", group segments per word boundary than per char
|
|
38633
|
+
if (wordRegex.test(original[originalCharIndex])) {
|
|
38634
|
+
// for first char in the boundary found, start the boundary by pushing a segment
|
|
38635
|
+
if (!charInHiresBoundary) {
|
|
38636
|
+
this.rawSegments.push(segment);
|
|
38637
|
+
charInHiresBoundary = true;
|
|
38638
|
+
}
|
|
38639
|
+
} else {
|
|
38640
|
+
// for non-word char, end the boundary by pushing a segment
|
|
38641
|
+
this.rawSegments.push(segment);
|
|
38642
|
+
charInHiresBoundary = false;
|
|
38643
|
+
}
|
|
38644
|
+
} else {
|
|
38645
|
+
this.rawSegments.push(segment);
|
|
38646
|
+
}
|
|
38647
|
+
}
|
|
38648
|
+
|
|
38612
38649
|
loc.column += 1;
|
|
38613
38650
|
this.generatedCodeColumn += 1;
|
|
38614
38651
|
first = false;
|
|
@@ -39555,7 +39592,7 @@ class ReferenceEmitEnvironment {
|
|
|
39555
39592
|
exports.ImportFlags.AllowTypeImports |
|
|
39556
39593
|
exports.ImportFlags.AllowRelativeDtsImports) {
|
|
39557
39594
|
const result = this.refEmitter.emit(ref, this.contextFile, flags);
|
|
39558
|
-
return result.kind ===
|
|
39595
|
+
return result.kind === exports.ReferenceEmitKind.Success;
|
|
39559
39596
|
}
|
|
39560
39597
|
/**
|
|
39561
39598
|
* Generate a `ts.TypeNode` that references the given node as a type.
|
|
@@ -44956,7 +44993,7 @@ class TemplateTypeCheckerImpl {
|
|
|
44956
44993
|
this.perf = perf;
|
|
44957
44994
|
}
|
|
44958
44995
|
getTemplate(component, optimizeFor) {
|
|
44959
|
-
const { data } = this.getLatestComponentState(component);
|
|
44996
|
+
const { data } = this.getLatestComponentState(component, optimizeFor);
|
|
44960
44997
|
if (data === null) {
|
|
44961
44998
|
return null;
|
|
44962
44999
|
}
|
|
@@ -45461,7 +45498,7 @@ class TemplateTypeCheckerImpl {
|
|
|
45461
45498
|
}
|
|
45462
45499
|
emit(kind, refTo, inContext) {
|
|
45463
45500
|
const emittedRef = this.refEmitter.emit(refTo, inContext.getSourceFile());
|
|
45464
|
-
if (emittedRef.kind ===
|
|
45501
|
+
if (emittedRef.kind === exports.ReferenceEmitKind.Failed) {
|
|
45465
45502
|
return null;
|
|
45466
45503
|
}
|
|
45467
45504
|
const emitted = emittedRef.expression;
|
|
@@ -45708,16 +45745,13 @@ class SingleShimTypeCheckingHost extends SingleFileTypeCheckingHost {
|
|
|
45708
45745
|
exports.AST = AST;
|
|
45709
45746
|
exports.ASTWithSource = ASTWithSource;
|
|
45710
45747
|
exports.AbsoluteModuleStrategy = AbsoluteModuleStrategy;
|
|
45711
|
-
exports.AbsoluteSourceSpan = AbsoluteSourceSpan;
|
|
45712
45748
|
exports.AmbientImport = AmbientImport;
|
|
45713
45749
|
exports.ArrowFunctionExpr = ArrowFunctionExpr;
|
|
45714
45750
|
exports.Binary = Binary;
|
|
45715
|
-
exports.BindingPipe = BindingPipe;
|
|
45716
45751
|
exports.BlockPlaceholder = BlockPlaceholder;
|
|
45717
45752
|
exports.BoundAttribute = BoundAttribute;
|
|
45718
45753
|
exports.BoundDeferredTrigger = BoundDeferredTrigger;
|
|
45719
45754
|
exports.BoundEvent = BoundEvent;
|
|
45720
|
-
exports.BoundText = BoundText;
|
|
45721
45755
|
exports.COMPILER_ERRORS_WITH_GUIDES = COMPILER_ERRORS_WITH_GUIDES;
|
|
45722
45756
|
exports.CR = CR;
|
|
45723
45757
|
exports.CUSTOM_ELEMENTS_SCHEMA = CUSTOM_ELEMENTS_SCHEMA;
|
|
@@ -45728,36 +45762,29 @@ exports.CompoundMetadataReader = CompoundMetadataReader;
|
|
|
45728
45762
|
exports.Conditional = Conditional;
|
|
45729
45763
|
exports.ConstantPool = ConstantPool;
|
|
45730
45764
|
exports.Container = Container;
|
|
45731
|
-
exports.Content = Content;
|
|
45732
45765
|
exports.CssSelector = CssSelector;
|
|
45733
45766
|
exports.DEFAULT_INTERPOLATION_CONFIG = DEFAULT_INTERPOLATION_CONFIG;
|
|
45734
45767
|
exports.DYNAMIC_TYPE = DYNAMIC_TYPE;
|
|
45735
45768
|
exports.Declaration = Declaration;
|
|
45736
45769
|
exports.DeclareFunctionStmt = DeclareFunctionStmt;
|
|
45737
45770
|
exports.DefaultImportTracker = DefaultImportTracker;
|
|
45738
|
-
exports.DeferredBlock = DeferredBlock;
|
|
45739
45771
|
exports.DefinitionMap = DefinitionMap;
|
|
45740
45772
|
exports.DomElementSchemaRegistry = DomElementSchemaRegistry;
|
|
45741
45773
|
exports.DynamicImportExpr = DynamicImportExpr;
|
|
45742
45774
|
exports.DynamicValue = DynamicValue;
|
|
45743
45775
|
exports.Element = Element;
|
|
45744
45776
|
exports.Element$1 = Element$1;
|
|
45745
|
-
exports.EmptyExpr = EmptyExpr$1;
|
|
45746
45777
|
exports.EnumValue = EnumValue;
|
|
45747
45778
|
exports.ExternalExpr = ExternalExpr;
|
|
45748
45779
|
exports.FatalDiagnosticError = FatalDiagnosticError;
|
|
45749
45780
|
exports.FnParam = FnParam;
|
|
45750
|
-
exports.ForLoopBlock = ForLoopBlock;
|
|
45751
45781
|
exports.FunctionExpr = FunctionExpr;
|
|
45752
45782
|
exports.HtmlParser = HtmlParser;
|
|
45753
45783
|
exports.I18nError = I18nError;
|
|
45754
45784
|
exports.INPUT_INITIALIZER_FN = INPUT_INITIALIZER_FN;
|
|
45755
45785
|
exports.Icu = Icu;
|
|
45756
|
-
exports.Icu$1 = Icu$1;
|
|
45757
45786
|
exports.IcuPlaceholder = IcuPlaceholder;
|
|
45758
45787
|
exports.Identifiers = Identifiers;
|
|
45759
|
-
exports.IfBlock = IfBlock;
|
|
45760
|
-
exports.IfBlockBranch = IfBlockBranch;
|
|
45761
45788
|
exports.ImplicitReceiver = ImplicitReceiver;
|
|
45762
45789
|
exports.ImportManager = ImportManager;
|
|
45763
45790
|
exports.Interpolation = Interpolation$1;
|
|
@@ -45802,7 +45829,6 @@ exports.SafePropertyRead = SafePropertyRead;
|
|
|
45802
45829
|
exports.SelectorMatcher = SelectorMatcher;
|
|
45803
45830
|
exports.Serializer = Serializer;
|
|
45804
45831
|
exports.StaticInterpreter = StaticInterpreter;
|
|
45805
|
-
exports.SwitchBlock = SwitchBlock;
|
|
45806
45832
|
exports.SyntheticValue = SyntheticValue;
|
|
45807
45833
|
exports.Tag = Tag;
|
|
45808
45834
|
exports.TagPlaceholder = TagPlaceholder;
|
|
@@ -45811,11 +45837,9 @@ exports.TemplateTypeCheckerImpl = TemplateTypeCheckerImpl;
|
|
|
45811
45837
|
exports.Text = Text;
|
|
45812
45838
|
exports.Text$1 = Text$1;
|
|
45813
45839
|
exports.Text$2 = Text$2;
|
|
45814
|
-
exports.Text$3 = Text$3;
|
|
45815
45840
|
exports.TextAttribute = TextAttribute;
|
|
45816
45841
|
exports.ThisReceiver = ThisReceiver;
|
|
45817
45842
|
exports.Trait = Trait;
|
|
45818
|
-
exports.TransplantedType = TransplantedType;
|
|
45819
45843
|
exports.TypeCheckShimGenerator = TypeCheckShimGenerator;
|
|
45820
45844
|
exports.TypeScriptReflectionHost = TypeScriptReflectionHost;
|
|
45821
45845
|
exports.UNSAFE_OBJECT_KEY_NAME_REGEXP = UNSAFE_OBJECT_KEY_NAME_REGEXP;
|
|
@@ -45844,7 +45868,6 @@ exports.conditionallyCreateDirectiveBindingLiteral = conditionallyCreateDirectiv
|
|
|
45844
45868
|
exports.convertFromMaybeForwardRefExpression = convertFromMaybeForwardRefExpression;
|
|
45845
45869
|
exports.copyFileShimData = copyFileShimData;
|
|
45846
45870
|
exports.createComponentType = createComponentType;
|
|
45847
|
-
exports.createCssSelectorFromNode = createCssSelectorFromNode;
|
|
45848
45871
|
exports.createDirectiveType = createDirectiveType;
|
|
45849
45872
|
exports.createFactoryType = createFactoryType;
|
|
45850
45873
|
exports.createHostDirectivesMappingArray = createHostDirectivesMappingArray;
|
|
@@ -45880,7 +45903,6 @@ exports.getSourceFileOrNull = getSourceFileOrNull;
|
|
|
45880
45903
|
exports.getTemplateDiagnostics = getTemplateDiagnostics;
|
|
45881
45904
|
exports.hasInjectableFields = hasInjectableFields;
|
|
45882
45905
|
exports.identifierOfNode = identifierOfNode;
|
|
45883
|
-
exports.ifStmt = ifStmt;
|
|
45884
45906
|
exports.importExpr = importExpr;
|
|
45885
45907
|
exports.isAbstractClassDeclaration = isAbstractClassDeclaration;
|
|
45886
45908
|
exports.isAliasImportDeclaration = isAliasImportDeclaration;
|