@angular/core 19.0.0-rc.1 → 19.0.0-rc.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/fesm2022/core.mjs +13164 -13060
- 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/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +4 -4
- package/index.d.ts +74 -13
- 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-9ca42e51.js → checker-e3da3b0a.js} +95 -54
- package/schematics/bundles/{combine_units-a16385aa.js → combine_units-2adebceb.js} +97 -28
- package/schematics/bundles/{compiler_host-31afa4ed.js → compiler_host-d642e87e.js} +2 -2
- package/schematics/bundles/control-flow-migration.js +3 -3
- package/schematics/bundles/explicit-standalone-flag.js +3 -3
- package/schematics/bundles/imports-4ac08251.js +1 -1
- package/schematics/bundles/inject-migration.js +3 -3
- package/schematics/bundles/leading_space-d190b83b.js +1 -1
- package/schematics/bundles/{migrate_ts_type_references-b2a28742.js → migrate_ts_type_references-ed2c0669.js} +527 -31
- package/schematics/bundles/nodes-0e7d45ca.js +1 -1
- package/schematics/bundles/output-migration.js +17 -14
- package/schematics/bundles/pending-tasks.js +3 -3
- package/schematics/bundles/{program-71beec0b.js → program-f984ab63.js} +45 -52
- package/schematics/bundles/project_tsconfig_paths-e9ccccbf.js +1 -1
- package/schematics/bundles/provide-initializer.js +3 -3
- package/schematics/bundles/route-lazy-loading.js +3 -3
- package/schematics/bundles/signal-input-migration.js +48 -35
- package/schematics/bundles/signal-queries-migration.js +21 -14
- package/schematics/bundles/signals.js +5 -5
- package/schematics/bundles/standalone-migration.js +159 -75
- package/schematics/ng-generate/signals/schema.json +1 -0
- package/testing/index.d.ts +1 -1
package/fesm2022/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.0.0-rc.
|
|
2
|
+
* @license Angular v19.0.0-rc.3
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -175,10 +175,10 @@ class TestBedApplicationErrorHandler {
|
|
|
175
175
|
throw e;
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.
|
|
179
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-rc.
|
|
178
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.3", ngImport: i0, type: TestBedApplicationErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
179
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-rc.3", ngImport: i0, type: TestBedApplicationErrorHandler });
|
|
180
180
|
}
|
|
181
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.
|
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.3", ngImport: i0, type: TestBedApplicationErrorHandler, decorators: [{
|
|
182
182
|
type: Injectable
|
|
183
183
|
}] });
|
|
184
184
|
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.0.0-rc.
|
|
2
|
+
* @license Angular v19.0.0-rc.3
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -3041,16 +3041,6 @@ declare const DEFER_BLOCK_ID = "di";
|
|
|
3041
3041
|
|
|
3042
3042
|
declare const DEFER_BLOCK_STATE = "s";
|
|
3043
3043
|
|
|
3044
|
-
/**
|
|
3045
|
-
* Basic set of data structures used for identifying a defer block
|
|
3046
|
-
* and triggering defer blocks
|
|
3047
|
-
*/
|
|
3048
|
-
declare interface DeferBlock {
|
|
3049
|
-
lView: LView;
|
|
3050
|
-
tNode: TNode;
|
|
3051
|
-
lContainer: LContainer;
|
|
3052
|
-
}
|
|
3053
|
-
|
|
3054
3044
|
/**
|
|
3055
3045
|
* Represents defer trigger types.
|
|
3056
3046
|
*/
|
|
@@ -3110,6 +3100,16 @@ declare interface DehydratedContainerView extends DehydratedView {
|
|
|
3110
3100
|
data: Readonly<SerializedContainerView>;
|
|
3111
3101
|
}
|
|
3112
3102
|
|
|
3103
|
+
/**
|
|
3104
|
+
* Basic set of data structures used for identifying a defer block
|
|
3105
|
+
* and triggering defer blocks
|
|
3106
|
+
*/
|
|
3107
|
+
declare interface DehydratedDeferBlock {
|
|
3108
|
+
lView: LView;
|
|
3109
|
+
tNode: TNode;
|
|
3110
|
+
lContainer: LContainer;
|
|
3111
|
+
}
|
|
3112
|
+
|
|
3113
3113
|
/**
|
|
3114
3114
|
* An object that contains information about a dehydrated ICU case,
|
|
3115
3115
|
* to facilitate cleaning up ICU cases that were active during
|
|
@@ -6793,12 +6793,20 @@ declare enum LContainerFlags {
|
|
|
6793
6793
|
declare type LegacyInputPartialMapping = string | [bindingPropertyName: string, classPropertyName: string, transformFunction?: Function];
|
|
6794
6794
|
|
|
6795
6795
|
/**
|
|
6796
|
-
*
|
|
6796
|
+
* Creates a writable signals whose value is initialized and reset by the linked, reactive computation.
|
|
6797
|
+
*
|
|
6798
|
+
* @developerPreview
|
|
6797
6799
|
*/
|
|
6798
6800
|
export declare function linkedSignal<D>(computation: () => D, options?: {
|
|
6799
6801
|
equal?: ValueEqualityFn<NoInfer<D>>;
|
|
6800
6802
|
}): WritableSignal<D>;
|
|
6801
6803
|
|
|
6804
|
+
/**
|
|
6805
|
+
* Creates a writable signals whose value is initialized and reset by the linked, reactive computation.
|
|
6806
|
+
* This is an advanced API form where the computation has access to the previous value of the signal and the computation result.
|
|
6807
|
+
*
|
|
6808
|
+
* @developerPreview
|
|
6809
|
+
*/
|
|
6802
6810
|
export declare function linkedSignal<S, D>(options: {
|
|
6803
6811
|
source: () => S;
|
|
6804
6812
|
computation: (source: NoInfer<S>, previous?: {
|
|
@@ -9582,6 +9590,38 @@ export declare interface RendererType2 {
|
|
|
9582
9590
|
getExternalStyles?: ((encapsulationId?: string) => string[]) | null;
|
|
9583
9591
|
}
|
|
9584
9592
|
|
|
9593
|
+
/**
|
|
9594
|
+
* Injection token representing the current HTTP request object.
|
|
9595
|
+
*
|
|
9596
|
+
* Use this token to access the current request when handling server-side
|
|
9597
|
+
* rendering (SSR).
|
|
9598
|
+
*
|
|
9599
|
+
* @remarks
|
|
9600
|
+
* This token may be `null` in the following scenarios:
|
|
9601
|
+
*
|
|
9602
|
+
* * During the build processes.
|
|
9603
|
+
* * When the application is rendered in the browser (client-side rendering).
|
|
9604
|
+
* * When performing static site generation (SSG).
|
|
9605
|
+
* * During route extraction in development (at the time of the request).
|
|
9606
|
+
*
|
|
9607
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request | `Request` on MDN}
|
|
9608
|
+
*
|
|
9609
|
+
* @developerPreview
|
|
9610
|
+
*/
|
|
9611
|
+
export declare const REQUEST: InjectionToken<Request | null>;
|
|
9612
|
+
|
|
9613
|
+
/**
|
|
9614
|
+
* Injection token for additional request context.
|
|
9615
|
+
*
|
|
9616
|
+
* Use this token to pass custom metadata or context related to the current request in server-side rendering.
|
|
9617
|
+
*
|
|
9618
|
+
* @remarks
|
|
9619
|
+
* This token is only available during server-side rendering and will be `null` in other contexts.
|
|
9620
|
+
*
|
|
9621
|
+
* @developerPreview
|
|
9622
|
+
*/
|
|
9623
|
+
export declare const REQUEST_CONTEXT: InjectionToken<unknown>;
|
|
9624
|
+
|
|
9585
9625
|
/**
|
|
9586
9626
|
* Lazily retrieves the reference value from a forwardRef.
|
|
9587
9627
|
*
|
|
@@ -9755,6 +9795,26 @@ export declare enum ResourceStatus {
|
|
|
9755
9795
|
Local = 5
|
|
9756
9796
|
}
|
|
9757
9797
|
|
|
9798
|
+
/**
|
|
9799
|
+
* Injection token for response initialization options.
|
|
9800
|
+
*
|
|
9801
|
+
* Use this token to provide response options for configuring or initializing
|
|
9802
|
+
* HTTP responses in server-side rendering or API endpoints.
|
|
9803
|
+
*
|
|
9804
|
+
* @remarks
|
|
9805
|
+
* This token may be `null` in the following scenarios:
|
|
9806
|
+
*
|
|
9807
|
+
* * During the build processes.
|
|
9808
|
+
* * When the application is rendered in the browser (client-side rendering).
|
|
9809
|
+
* * When performing static site generation (SSG).
|
|
9810
|
+
* * During route extraction in development (at the time of the request).
|
|
9811
|
+
*
|
|
9812
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Response/Response | `ResponseInit` on MDN}
|
|
9813
|
+
*
|
|
9814
|
+
* @developerPreview
|
|
9815
|
+
*/
|
|
9816
|
+
export declare const RESPONSE_INIT: InjectionToken<ResponseInit | null>;
|
|
9817
|
+
|
|
9758
9818
|
/**
|
|
9759
9819
|
* The goal here is to make sure that the browser DOM API is the Renderer.
|
|
9760
9820
|
* We do this by defining a subset of DOM API to be the renderer and then
|
|
@@ -13170,7 +13230,7 @@ export declare interface ɵDeferBlockDependencyInterceptor {
|
|
|
13170
13230
|
/**
|
|
13171
13231
|
* Defer block instance for testing.
|
|
13172
13232
|
*/
|
|
13173
|
-
export declare interface ɵDeferBlockDetails extends
|
|
13233
|
+
export declare interface ɵDeferBlockDetails extends DehydratedDeferBlock {
|
|
13174
13234
|
tDetails: TDeferBlockDetails;
|
|
13175
13235
|
}
|
|
13176
13236
|
|
|
@@ -14263,6 +14323,7 @@ export declare class ɵRender3NgModuleRef<T> extends NgModuleRef<T> implements I
|
|
|
14263
14323
|
onDestroy(callback: () => void): void;
|
|
14264
14324
|
}
|
|
14265
14325
|
|
|
14326
|
+
/** Rendering Helpers */
|
|
14266
14327
|
/**
|
|
14267
14328
|
* Transitions a defer block to the new state. Updates the necessary
|
|
14268
14329
|
* data structures and renders corresponding block.
|
package/package.json
CHANGED
package/rxjs-interop/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.0.0-rc.
|
|
3
|
+
* @license Angular v19.0.0-rc.3
|
|
4
4
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -7767,13 +7767,15 @@ class ShadowCss {
|
|
|
7767
7767
|
_polyfillHostRe.lastIndex = 0;
|
|
7768
7768
|
if (_polyfillHostRe.test(selector)) {
|
|
7769
7769
|
const replaceBy = `[${hostSelector}]`;
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
return
|
|
7770
|
+
let result = selector;
|
|
7771
|
+
while (result.match(_polyfillHostNoCombinatorRe)) {
|
|
7772
|
+
result = result.replace(_polyfillHostNoCombinatorRe, (_hnc, selector) => {
|
|
7773
|
+
return selector.replace(/([^:\)]*)(:*)(.*)/, (_, before, colon, after) => {
|
|
7774
|
+
return before + replaceBy + colon + after;
|
|
7775
|
+
});
|
|
7774
7776
|
});
|
|
7775
|
-
}
|
|
7776
|
-
|
|
7777
|
+
}
|
|
7778
|
+
return result.replace(_polyfillHostRe, replaceBy);
|
|
7777
7779
|
}
|
|
7778
7780
|
return scopeSelector + ' ' + selector;
|
|
7779
7781
|
}
|
|
@@ -7782,7 +7784,7 @@ class ShadowCss {
|
|
|
7782
7784
|
_applySelectorScope({ selector, scopeSelector, hostSelector, isParentSelector, }) {
|
|
7783
7785
|
const isRe = /\[is=([^\]]*)\]/g;
|
|
7784
7786
|
scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);
|
|
7785
|
-
const attrName =
|
|
7787
|
+
const attrName = `[${scopeSelector}]`;
|
|
7786
7788
|
const _scopeSelectorPart = (p) => {
|
|
7787
7789
|
let scopedP = p.trim();
|
|
7788
7790
|
if (!scopedP) {
|
|
@@ -7790,8 +7792,8 @@ class ShadowCss {
|
|
|
7790
7792
|
}
|
|
7791
7793
|
if (p.includes(_polyfillHostNoCombinator)) {
|
|
7792
7794
|
scopedP = this._applySimpleSelectorScope(p, scopeSelector, hostSelector);
|
|
7793
|
-
if (
|
|
7794
|
-
const [_, before, colon, after] = scopedP.match(/([^:]*)(:*)(
|
|
7795
|
+
if (!p.match(_polyfillHostNoCombinatorOutsidePseudoFunction)) {
|
|
7796
|
+
const [_, before, colon, after] = scopedP.match(/([^:]*)(:*)([\s\S]*)/);
|
|
7795
7797
|
scopedP = before + attrName + colon + after;
|
|
7796
7798
|
}
|
|
7797
7799
|
}
|
|
@@ -7799,7 +7801,7 @@ class ShadowCss {
|
|
|
7799
7801
|
// remove :host since it should be unnecessary
|
|
7800
7802
|
const t = p.replace(_polyfillHostRe, '');
|
|
7801
7803
|
if (t.length > 0) {
|
|
7802
|
-
const matches = t.match(/([^:]*)(:*)(
|
|
7804
|
+
const matches = t.match(/([^:]*)(:*)([\s\S]*)/);
|
|
7803
7805
|
if (matches) {
|
|
7804
7806
|
scopedP = matches[1] + attrName + matches[2] + matches[3];
|
|
7805
7807
|
}
|
|
@@ -7812,24 +7814,55 @@ class ShadowCss {
|
|
|
7812
7814
|
// functions are recursively sent to `_scopeSelector()`.
|
|
7813
7815
|
const _pseudoFunctionAwareScopeSelectorPart = (selectorPart) => {
|
|
7814
7816
|
let scopedPart = '';
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
7817
|
+
// Collect all outer `:where()` and `:is()` selectors,
|
|
7818
|
+
// counting parenthesis to keep nested selectors intact.
|
|
7819
|
+
const pseudoSelectorParts = [];
|
|
7820
|
+
let pseudoSelectorMatch;
|
|
7821
|
+
while ((pseudoSelectorMatch = _cssPrefixWithPseudoSelectorFunction.exec(selectorPart)) !== null) {
|
|
7822
|
+
let openedBrackets = 1;
|
|
7823
|
+
let index = _cssPrefixWithPseudoSelectorFunction.lastIndex;
|
|
7824
|
+
while (index < selectorPart.length) {
|
|
7825
|
+
const currentSymbol = selectorPart[index];
|
|
7826
|
+
index++;
|
|
7827
|
+
if (currentSymbol === '(') {
|
|
7828
|
+
openedBrackets++;
|
|
7829
|
+
continue;
|
|
7830
|
+
}
|
|
7831
|
+
if (currentSymbol === ')') {
|
|
7832
|
+
openedBrackets--;
|
|
7833
|
+
if (openedBrackets === 0) {
|
|
7834
|
+
break;
|
|
7835
|
+
}
|
|
7836
|
+
continue;
|
|
7837
|
+
}
|
|
7838
|
+
}
|
|
7839
|
+
pseudoSelectorParts.push(`${pseudoSelectorMatch[0]}${selectorPart.slice(_cssPrefixWithPseudoSelectorFunction.lastIndex, index)}`);
|
|
7840
|
+
_cssPrefixWithPseudoSelectorFunction.lastIndex = index;
|
|
7841
|
+
}
|
|
7842
|
+
// If selector consists of only `:where()` and `:is()` on the outer level
|
|
7843
|
+
// scope those pseudo-selectors individually, otherwise scope the whole
|
|
7844
|
+
// selector.
|
|
7845
|
+
if (pseudoSelectorParts.join('') === selectorPart) {
|
|
7846
|
+
scopedPart = pseudoSelectorParts
|
|
7847
|
+
.map((selectorPart) => {
|
|
7848
|
+
const [cssPseudoSelectorFunction] = selectorPart.match(_cssPrefixWithPseudoSelectorFunction) ?? [];
|
|
7849
|
+
// Unwrap the pseudo selector to scope its contents.
|
|
7850
|
+
// For example,
|
|
7851
|
+
// - `:where(selectorToScope)` -> `selectorToScope`;
|
|
7852
|
+
// - `:is(.foo, .bar)` -> `.foo, .bar`.
|
|
7853
|
+
const selectorToScope = selectorPart.slice(cssPseudoSelectorFunction?.length, -1);
|
|
7854
|
+
if (selectorToScope.includes(_polyfillHostNoCombinator)) {
|
|
7855
|
+
this._shouldScopeIndicator = true;
|
|
7856
|
+
}
|
|
7857
|
+
const scopedInnerPart = this._scopeSelector({
|
|
7858
|
+
selector: selectorToScope,
|
|
7859
|
+
scopeSelector,
|
|
7860
|
+
hostSelector,
|
|
7861
|
+
});
|
|
7862
|
+
// Put the result back into the pseudo selector function.
|
|
7863
|
+
return `${cssPseudoSelectorFunction}${scopedInnerPart})`;
|
|
7864
|
+
})
|
|
7865
|
+
.join('');
|
|
7833
7866
|
}
|
|
7834
7867
|
else {
|
|
7835
7868
|
this._shouldScopeIndicator =
|
|
@@ -7950,7 +7983,7 @@ class SafeSelector {
|
|
|
7950
7983
|
}
|
|
7951
7984
|
}
|
|
7952
7985
|
const _cssScopedPseudoFunctionPrefix = '(:(where|is)\\()?';
|
|
7953
|
-
const _cssPrefixWithPseudoSelectorFunction =
|
|
7986
|
+
const _cssPrefixWithPseudoSelectorFunction = /:(where|is)\(/gi;
|
|
7954
7987
|
const _cssContentNextSelectorRe = /polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim;
|
|
7955
7988
|
const _cssContentRuleRe = /(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim;
|
|
7956
7989
|
const _cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim;
|
|
@@ -7962,9 +7995,8 @@ const _cssColonHostRe = new RegExp(_polyfillHost + _parenSuffix, 'gim');
|
|
|
7962
7995
|
const _cssColonHostContextReGlobal = new RegExp(_cssScopedPseudoFunctionPrefix + '(' + _polyfillHostContext + _parenSuffix + ')', 'gim');
|
|
7963
7996
|
const _cssColonHostContextRe = new RegExp(_polyfillHostContext + _parenSuffix, 'im');
|
|
7964
7997
|
const _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';
|
|
7965
|
-
const
|
|
7966
|
-
const _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
|
|
7967
|
-
const _polyfillHostNoCombinatorReGlobal = new RegExp(_polyfillHostNoCombinatorRe, 'g');
|
|
7998
|
+
const _polyfillHostNoCombinatorOutsidePseudoFunction = new RegExp(`${_polyfillHostNoCombinator}(?![^(]*\\))`, 'g');
|
|
7999
|
+
const _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s,]*)/;
|
|
7968
8000
|
const _shadowDOMSelectorsRe = [
|
|
7969
8001
|
/::shadow/g,
|
|
7970
8002
|
/::content/g,
|
|
@@ -25876,15 +25908,16 @@ function convertSourceSpan(span, baseSourceSpan) {
|
|
|
25876
25908
|
* workaround, because it'll include an additional text node as the first child. We can work
|
|
25877
25909
|
* around it here, but in a discussion it was decided not to, because the user explicitly opted
|
|
25878
25910
|
* into preserving the whitespace and we would have to drop it from the generated code.
|
|
25879
|
-
* The diagnostic mentioned point #1 will flag such cases to users.
|
|
25911
|
+
* The diagnostic mentioned point in #1 will flag such cases to users.
|
|
25880
25912
|
*
|
|
25881
25913
|
* @returns Tag name to be used for the control flow template.
|
|
25882
25914
|
*/
|
|
25883
25915
|
function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
25884
25916
|
let root = null;
|
|
25885
25917
|
for (const child of node.children) {
|
|
25886
|
-
// Skip over comment nodes
|
|
25887
|
-
|
|
25918
|
+
// Skip over comment nodes and @let declarations since
|
|
25919
|
+
// it doesn't matter where they end up in the DOM.
|
|
25920
|
+
if (child instanceof Comment$1 || child instanceof LetDeclaration$1) {
|
|
25888
25921
|
continue;
|
|
25889
25922
|
}
|
|
25890
25923
|
// We can only infer the tag name/attributes if there's a single root node.
|
|
@@ -25895,6 +25928,9 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
25895
25928
|
if (child instanceof Element$1 || (child instanceof Template && child.tagName !== null)) {
|
|
25896
25929
|
root = child;
|
|
25897
25930
|
}
|
|
25931
|
+
else {
|
|
25932
|
+
return null;
|
|
25933
|
+
}
|
|
25898
25934
|
}
|
|
25899
25935
|
// If we've found a single root node, its tag name and attributes can be
|
|
25900
25936
|
// copied to the surrounding template to be used for content projection.
|
|
@@ -30274,7 +30310,7 @@ function publishFacade(global) {
|
|
|
30274
30310
|
* @description
|
|
30275
30311
|
* Entry point for all public APIs of the compiler package.
|
|
30276
30312
|
*/
|
|
30277
|
-
new Version('19.0.0-rc.
|
|
30313
|
+
new Version('19.0.0-rc.3');
|
|
30278
30314
|
|
|
30279
30315
|
const _I18N_ATTR = 'i18n';
|
|
30280
30316
|
const _I18N_ATTR_PREFIX = 'i18n-';
|
|
@@ -31682,7 +31718,7 @@ class NodeJSPathManipulation {
|
|
|
31682
31718
|
// G3-ESM-MARKER: G3 uses CommonJS, but externally everything in ESM.
|
|
31683
31719
|
// CommonJS/ESM interop for determining the current file name and containing dir.
|
|
31684
31720
|
const isCommonJS = typeof __filename !== 'undefined';
|
|
31685
|
-
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-
|
|
31721
|
+
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-e3da3b0a.js', document.baseURI).href));
|
|
31686
31722
|
const currentFileName = isCommonJS ? __filename : url.fileURLToPath(currentFileUrl);
|
|
31687
31723
|
/**
|
|
31688
31724
|
* A wrapper around the Node.js file-system that supports readonly operations and path manipulation.
|
|
@@ -31948,6 +31984,11 @@ exports.ImportFlags = void 0;
|
|
|
31948
31984
|
*/
|
|
31949
31985
|
ImportFlags[ImportFlags["AllowAmbientReferences"] = 16] = "AllowAmbientReferences";
|
|
31950
31986
|
})(exports.ImportFlags || (exports.ImportFlags = {}));
|
|
31987
|
+
exports.ReferenceEmitKind = void 0;
|
|
31988
|
+
(function (ReferenceEmitKind) {
|
|
31989
|
+
ReferenceEmitKind[ReferenceEmitKind["Success"] = 0] = "Success";
|
|
31990
|
+
ReferenceEmitKind[ReferenceEmitKind["Failed"] = 1] = "Failed";
|
|
31991
|
+
})(exports.ReferenceEmitKind || (exports.ReferenceEmitKind = {}));
|
|
31951
31992
|
/**
|
|
31952
31993
|
* Verifies that a reference was emitted successfully, or raises a `FatalDiagnosticError` otherwise.
|
|
31953
31994
|
* @param result The emit result that should have been successful.
|
|
@@ -31956,7 +31997,7 @@ exports.ImportFlags = void 0;
|
|
|
31956
31997
|
* 'class'.
|
|
31957
31998
|
*/
|
|
31958
31999
|
function assertSuccessfulReferenceEmit(result, origin, typeKind) {
|
|
31959
|
-
if (result.kind ===
|
|
32000
|
+
if (result.kind === exports.ReferenceEmitKind.Success) {
|
|
31960
32001
|
return;
|
|
31961
32002
|
}
|
|
31962
32003
|
const message = makeDiagnosticChain(`Unable to import ${typeKind} ${nodeNameForError(result.ref.node)}.`, [makeDiagnosticChain(result.reason)]);
|
|
@@ -31983,7 +32024,7 @@ class ReferenceEmitter {
|
|
|
31983
32024
|
}
|
|
31984
32025
|
}
|
|
31985
32026
|
return {
|
|
31986
|
-
kind:
|
|
32027
|
+
kind: exports.ReferenceEmitKind.Failed,
|
|
31987
32028
|
ref,
|
|
31988
32029
|
context,
|
|
31989
32030
|
reason: `Unable to write a reference to ${nodeNameForError(ref.node)}.`,
|
|
@@ -32009,7 +32050,7 @@ class LocalIdentifierStrategy {
|
|
|
32009
32050
|
// invalid emission of a free-standing `foo` identifier, rather than `exports.foo`.
|
|
32010
32051
|
if (!isDeclaration(ref.node) && refSf === context) {
|
|
32011
32052
|
return {
|
|
32012
|
-
kind:
|
|
32053
|
+
kind: exports.ReferenceEmitKind.Success,
|
|
32013
32054
|
expression: new WrappedNodeExpr(ref.node),
|
|
32014
32055
|
importedFile: null,
|
|
32015
32056
|
};
|
|
@@ -32019,7 +32060,7 @@ class LocalIdentifierStrategy {
|
|
|
32019
32060
|
const identifier = identifierOfNode(ref.node);
|
|
32020
32061
|
if (identifier !== null) {
|
|
32021
32062
|
return {
|
|
32022
|
-
kind:
|
|
32063
|
+
kind: exports.ReferenceEmitKind.Success,
|
|
32023
32064
|
expression: new WrappedNodeExpr(identifier),
|
|
32024
32065
|
importedFile: null,
|
|
32025
32066
|
};
|
|
@@ -32033,7 +32074,7 @@ class LocalIdentifierStrategy {
|
|
|
32033
32074
|
const identifier = ref.getIdentityIn(context);
|
|
32034
32075
|
if (identifier !== null) {
|
|
32035
32076
|
return {
|
|
32036
|
-
kind:
|
|
32077
|
+
kind: exports.ReferenceEmitKind.Success,
|
|
32037
32078
|
expression: new WrappedNodeExpr(identifier),
|
|
32038
32079
|
importedFile: null,
|
|
32039
32080
|
};
|
|
@@ -32086,7 +32127,7 @@ class AbsoluteModuleStrategy {
|
|
|
32086
32127
|
const exports$1 = this.getExportsOfModule(specifier, resolutionContext);
|
|
32087
32128
|
if (exports$1.module === null) {
|
|
32088
32129
|
return {
|
|
32089
|
-
kind:
|
|
32130
|
+
kind: exports.ReferenceEmitKind.Failed,
|
|
32090
32131
|
ref,
|
|
32091
32132
|
context,
|
|
32092
32133
|
reason: `The module '${specifier}' could not be found.`,
|
|
@@ -32094,7 +32135,7 @@ class AbsoluteModuleStrategy {
|
|
|
32094
32135
|
}
|
|
32095
32136
|
else if (exports$1.exportMap === null || !exports$1.exportMap.has(ref.node)) {
|
|
32096
32137
|
return {
|
|
32097
|
-
kind:
|
|
32138
|
+
kind: exports.ReferenceEmitKind.Failed,
|
|
32098
32139
|
ref,
|
|
32099
32140
|
context,
|
|
32100
32141
|
reason: `The symbol is not exported from ${exports$1.module.fileName} (module '${specifier}').`,
|
|
@@ -32102,7 +32143,7 @@ class AbsoluteModuleStrategy {
|
|
|
32102
32143
|
}
|
|
32103
32144
|
const symbolName = exports$1.exportMap.get(ref.node);
|
|
32104
32145
|
return {
|
|
32105
|
-
kind:
|
|
32146
|
+
kind: exports.ReferenceEmitKind.Success,
|
|
32106
32147
|
expression: new ExternalExpr(new ExternalReference(specifier, symbolName)),
|
|
32107
32148
|
importedFile: exports$1.module,
|
|
32108
32149
|
};
|
|
@@ -32173,7 +32214,7 @@ class LogicalProjectStrategy {
|
|
|
32173
32214
|
// Note: this error is analogous to `TS6059: File is not under 'rootDir'` that TypeScript
|
|
32174
32215
|
// reports.
|
|
32175
32216
|
return {
|
|
32176
|
-
kind:
|
|
32217
|
+
kind: exports.ReferenceEmitKind.Failed,
|
|
32177
32218
|
ref,
|
|
32178
32219
|
context,
|
|
32179
32220
|
reason: `The file ${destSf.fileName} is outside of the configured 'rootDir'.`,
|
|
@@ -32191,7 +32232,7 @@ class LogicalProjectStrategy {
|
|
|
32191
32232
|
if (name === null) {
|
|
32192
32233
|
// The target declaration isn't exported from the file it's declared in. This is an issue!
|
|
32193
32234
|
return {
|
|
32194
|
-
kind:
|
|
32235
|
+
kind: exports.ReferenceEmitKind.Failed,
|
|
32195
32236
|
ref,
|
|
32196
32237
|
context,
|
|
32197
32238
|
reason: `The symbol is not exported from ${destSf.fileName}.`,
|
|
@@ -32201,7 +32242,7 @@ class LogicalProjectStrategy {
|
|
|
32201
32242
|
// path is now straightforward.
|
|
32202
32243
|
const moduleName = LogicalProjectPath.relativePathBetween(originPath, destPath);
|
|
32203
32244
|
return {
|
|
32204
|
-
kind:
|
|
32245
|
+
kind: exports.ReferenceEmitKind.Success,
|
|
32205
32246
|
expression: new ExternalExpr({ moduleName, name }),
|
|
32206
32247
|
importedFile: destSf,
|
|
32207
32248
|
};
|
|
@@ -32225,14 +32266,14 @@ class RelativePathStrategy {
|
|
|
32225
32266
|
const name = findExportedNameOfNode(ref.node, destSf, this.reflector);
|
|
32226
32267
|
if (name === null) {
|
|
32227
32268
|
return {
|
|
32228
|
-
kind:
|
|
32269
|
+
kind: exports.ReferenceEmitKind.Failed,
|
|
32229
32270
|
ref,
|
|
32230
32271
|
context,
|
|
32231
32272
|
reason: `The symbol is not exported from ${destSf.fileName}.`,
|
|
32232
32273
|
};
|
|
32233
32274
|
}
|
|
32234
32275
|
return {
|
|
32235
|
-
kind:
|
|
32276
|
+
kind: exports.ReferenceEmitKind.Success,
|
|
32236
32277
|
expression: new ExternalExpr({ moduleName, name }),
|
|
32237
32278
|
importedFile: destSf,
|
|
32238
32279
|
};
|
|
@@ -32257,7 +32298,7 @@ class UnifiedModulesStrategy {
|
|
|
32257
32298
|
}
|
|
32258
32299
|
const moduleName = this.unifiedModulesHost.fileNameToModuleName(destSf.fileName, context.fileName);
|
|
32259
32300
|
return {
|
|
32260
|
-
kind:
|
|
32301
|
+
kind: exports.ReferenceEmitKind.Success,
|
|
32261
32302
|
expression: new ExternalExpr({ moduleName, name }),
|
|
32262
32303
|
importedFile: destSf,
|
|
32263
32304
|
};
|
|
@@ -39583,7 +39624,7 @@ class ReferenceEmitEnvironment {
|
|
|
39583
39624
|
exports.ImportFlags.AllowTypeImports |
|
|
39584
39625
|
exports.ImportFlags.AllowRelativeDtsImports) {
|
|
39585
39626
|
const result = this.refEmitter.emit(ref, this.contextFile, flags);
|
|
39586
|
-
return result.kind ===
|
|
39627
|
+
return result.kind === exports.ReferenceEmitKind.Success;
|
|
39587
39628
|
}
|
|
39588
39629
|
/**
|
|
39589
39630
|
* Generate a `ts.TypeNode` that references the given node as a type.
|
|
@@ -45489,7 +45530,7 @@ class TemplateTypeCheckerImpl {
|
|
|
45489
45530
|
}
|
|
45490
45531
|
emit(kind, refTo, inContext) {
|
|
45491
45532
|
const emittedRef = this.refEmitter.emit(refTo, inContext.getSourceFile());
|
|
45492
|
-
if (emittedRef.kind ===
|
|
45533
|
+
if (emittedRef.kind === exports.ReferenceEmitKind.Failed) {
|
|
45493
45534
|
return null;
|
|
45494
45535
|
}
|
|
45495
45536
|
const emitted = emittedRef.expression;
|