@angular/core 14.0.0-rc.3 → 14.0.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/esm2020/src/di/interface/provider.mjs +1 -1
- package/esm2020/src/di/provider_collection.mjs +32 -2
- package/esm2020/src/di/r3_injector.mjs +3 -1
- package/esm2020/src/error_handler.mjs +4 -7
- package/esm2020/src/errors.mjs +6 -3
- package/esm2020/src/metadata/directives.mjs +1 -1
- package/esm2020/src/render3/component.mjs +9 -9
- package/esm2020/src/render3/definition.mjs +4 -4
- package/esm2020/src/render3/features/standalone_feature.mjs +4 -4
- package/esm2020/src/render3/instructions/all.mjs +2 -2
- package/esm2020/src/render3/instructions/element.mjs +3 -79
- package/esm2020/src/render3/instructions/element_validation.mjs +264 -0
- package/esm2020/src/render3/instructions/shared.mjs +7 -184
- package/esm2020/src/render3/interfaces/definition.mjs +1 -1
- package/esm2020/src/render3/jit/module.mjs +3 -2
- package/esm2020/src/render3/ng_module_ref.mjs +2 -1
- package/esm2020/src/render3/pipe.mjs +20 -6
- package/esm2020/src/render3/state.mjs +1 -3
- package/esm2020/src/util/errors.mjs +1 -8
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/logger.mjs +3 -3
- package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
- package/fesm2015/core.mjs +631 -586
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +632 -587
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +632 -587
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +633 -588
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +48 -7
- package/package.json +1 -1
- package/testing/index.d.ts +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.0.
|
|
2
|
+
* @license Angular v14.0.2
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1029,6 +1029,8 @@ export declare interface Component extends Directive {
|
|
|
1029
1029
|
*
|
|
1030
1030
|
* More information about standalone components, directives and pipes can be found in [this
|
|
1031
1031
|
* guide](guide/standalone-components).
|
|
1032
|
+
*
|
|
1033
|
+
* @developerPreview
|
|
1032
1034
|
*/
|
|
1033
1035
|
standalone?: boolean;
|
|
1034
1036
|
/**
|
|
@@ -1041,6 +1043,8 @@ export declare interface Component extends Directive {
|
|
|
1041
1043
|
*
|
|
1042
1044
|
* More information about standalone components, directives and pipes can be found in [this
|
|
1043
1045
|
* guide](guide/standalone-components).
|
|
1046
|
+
*
|
|
1047
|
+
* @developerPreview
|
|
1044
1048
|
*/
|
|
1045
1049
|
imports?: (Type<any> | any[])[];
|
|
1046
1050
|
/**
|
|
@@ -1643,6 +1647,7 @@ declare interface CreateComponentOptions {
|
|
|
1643
1647
|
* Create a new environment injector.
|
|
1644
1648
|
*
|
|
1645
1649
|
* @publicApi
|
|
1650
|
+
* @developerPreview
|
|
1646
1651
|
*/
|
|
1647
1652
|
export declare function createEnvironmentInjector(providers: Array<Provider | ImportedNgModuleProviders>, parent?: EnvironmentInjector | null, debugName?: string | null): EnvironmentInjector;
|
|
1648
1653
|
|
|
@@ -2283,6 +2288,8 @@ export declare interface Directive {
|
|
|
2283
2288
|
*
|
|
2284
2289
|
* More information about standalone components, directives and pipes can be found in [this
|
|
2285
2290
|
* guide](guide/standalone-components).
|
|
2291
|
+
*
|
|
2292
|
+
* @developerPreview
|
|
2286
2293
|
*/
|
|
2287
2294
|
standalone?: boolean;
|
|
2288
2295
|
}
|
|
@@ -2610,6 +2617,8 @@ export declare const ENVIRONMENT_INITIALIZER: InjectionToken<() => void>;
|
|
|
2610
2617
|
/**
|
|
2611
2618
|
* An `Injector` that's part of the environment injector hierarchy, which exists outside of the
|
|
2612
2619
|
* component tree.
|
|
2620
|
+
*
|
|
2621
|
+
* @developerPreview
|
|
2613
2622
|
*/
|
|
2614
2623
|
export declare abstract class EnvironmentInjector implements Injector {
|
|
2615
2624
|
/**
|
|
@@ -3472,6 +3481,7 @@ declare const ID = 20;
|
|
|
3472
3481
|
* @see `importProvidersFrom`
|
|
3473
3482
|
*
|
|
3474
3483
|
* @publicApi
|
|
3484
|
+
* @developerPreview
|
|
3475
3485
|
*/
|
|
3476
3486
|
export declare interface ImportedNgModuleProviders {
|
|
3477
3487
|
ɵproviders: Provider[];
|
|
@@ -3485,14 +3495,45 @@ export declare interface ImportedNgModuleProviders {
|
|
|
3485
3495
|
* another environment injector (such as a route injector). They should not be used in component
|
|
3486
3496
|
* providers.
|
|
3487
3497
|
*
|
|
3488
|
-
*
|
|
3498
|
+
* More information about standalone components can be found in [this
|
|
3499
|
+
* guide](guide/standalone-components).
|
|
3500
|
+
*
|
|
3501
|
+
* @usageNotes
|
|
3502
|
+
* The results of the `importProvidersFrom` call can be used in the `bootstrapApplication` call:
|
|
3503
|
+
*
|
|
3504
|
+
* ```typescript
|
|
3505
|
+
* await bootstrapApplication(RootComponent, {
|
|
3506
|
+
* providers: [
|
|
3507
|
+
* importProvidersFrom(NgModuleOne, NgModuleTwo)
|
|
3508
|
+
* ]
|
|
3509
|
+
* });
|
|
3510
|
+
* ```
|
|
3511
|
+
*
|
|
3512
|
+
* You can also use the `importProvidersFrom` results in the `providers` field of a route, when a
|
|
3513
|
+
* standalone component is used:
|
|
3514
|
+
*
|
|
3515
|
+
* ```typescript
|
|
3516
|
+
* export const ROUTES: Route[] = [
|
|
3517
|
+
* {
|
|
3518
|
+
* path: 'foo',
|
|
3519
|
+
* providers: [
|
|
3520
|
+
* importProvidersFrom(NgModuleOne, NgModuleTwo)
|
|
3521
|
+
* ],
|
|
3522
|
+
* component: YourStandaloneComponent
|
|
3523
|
+
* }
|
|
3524
|
+
* ];
|
|
3525
|
+
* ```
|
|
3526
|
+
*
|
|
3527
|
+
* @returns Collected providers from the specified list of types.
|
|
3489
3528
|
* @publicApi
|
|
3529
|
+
* @developerPreview
|
|
3490
3530
|
*/
|
|
3491
3531
|
export declare function importProvidersFrom(...sources: ImportProvidersSource[]): ImportedNgModuleProviders;
|
|
3492
3532
|
|
|
3493
3533
|
/**
|
|
3494
3534
|
* A source of providers for the `importProvidersFrom` function.
|
|
3495
3535
|
*
|
|
3536
|
+
* @developerPreview
|
|
3496
3537
|
* @publicApi
|
|
3497
3538
|
*/
|
|
3498
3539
|
export declare type ImportProvidersSource = Type<unknown> | ModuleWithProviders<unknown> | Array<ImportProvidersSource>;
|
|
@@ -9652,7 +9693,8 @@ export declare function ɵcompilePipe(type: Type<any>, meta: Pipe): void;
|
|
|
9652
9693
|
*/
|
|
9653
9694
|
export declare interface ɵComponentDef<T> extends ɵDirectiveDef<T> {
|
|
9654
9695
|
/**
|
|
9655
|
-
*
|
|
9696
|
+
* Unique ID for the component. Used in view encapsulation and
|
|
9697
|
+
* to keep track of the injector in standalone components.
|
|
9656
9698
|
*/
|
|
9657
9699
|
readonly id: string;
|
|
9658
9700
|
/**
|
|
@@ -10199,7 +10241,7 @@ export declare class ɵLContext {
|
|
|
10199
10241
|
* renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});
|
|
10200
10242
|
* ```
|
|
10201
10243
|
*/
|
|
10202
|
-
export declare function ɵLifecycleHooksFeature(
|
|
10244
|
+
export declare function ɵLifecycleHooksFeature(): void;
|
|
10203
10245
|
|
|
10204
10246
|
/**
|
|
10205
10247
|
* Index of each type of locale data from the locale data array
|
|
@@ -10824,7 +10866,6 @@ export declare function ɵsetDocument(document: Document | undefined): void;
|
|
|
10824
10866
|
*/
|
|
10825
10867
|
export declare function ɵsetLocaleId(localeId: string): void;
|
|
10826
10868
|
|
|
10827
|
-
|
|
10828
10869
|
/**
|
|
10829
10870
|
* Sets a strict mode for JIT-compiled components to throw an error on unknown elements,
|
|
10830
10871
|
* instead of just logging the error.
|
|
@@ -10863,7 +10904,7 @@ export declare const ɵTESTABILITY_GETTER: InjectionToken<GetTestability>;
|
|
|
10863
10904
|
|
|
10864
10905
|
/**
|
|
10865
10906
|
* Compute the pair of transitive scopes (compilation scope and exported scope) for a given type
|
|
10866
|
-
* (
|
|
10907
|
+
* (either a NgModule or a standalone component / directive / pipe).
|
|
10867
10908
|
*/
|
|
10868
10909
|
export declare function ɵtransitiveScopesFor<T>(type: Type<T>): ɵNgModuleTransitiveScopes;
|
|
10869
10910
|
|
|
@@ -12396,6 +12437,7 @@ export declare function ɵɵelementContainerStart(index: number, attrsIndex?: nu
|
|
|
12396
12437
|
*/
|
|
12397
12438
|
export declare function ɵɵelementEnd(): typeof ɵɵelementEnd;
|
|
12398
12439
|
|
|
12440
|
+
|
|
12399
12441
|
/**
|
|
12400
12442
|
* Create DOM element. The instruction must later be followed by `elementEnd()` call.
|
|
12401
12443
|
*
|
|
@@ -13686,7 +13728,6 @@ export declare function ɵɵresolveWindow(element: RElement & {
|
|
|
13686
13728
|
* @returns Context of the restored OpaqueViewState instance.
|
|
13687
13729
|
*
|
|
13688
13730
|
* @codeGenApi
|
|
13689
|
-
* @noinline Disable inlining due to issue with Closure in listeners inside embedded views.
|
|
13690
13731
|
*/
|
|
13691
13732
|
export declare function ɵɵrestoreView<T = any>(viewToRestore: OpaqueViewState): T;
|
|
13692
13733
|
|
package/package.json
CHANGED
package/testing/index.d.ts
CHANGED