@angular/core 14.0.0-rc.2 → 14.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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.0.0-rc.2
2
+ * @license Angular v14.0.0-rc.3
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1026,6 +1026,9 @@ export declare interface Component extends Directive {
1026
1026
  * Angular components marked as `standalone` do not need to be declared in an NgModule. Such
1027
1027
  * components directly manage their own template dependencies (components, directives and pipes
1028
1028
  * used in a template) via the imports property.
1029
+ *
1030
+ * More information about standalone components, directives and pipes can be found in [this
1031
+ * guide](guide/standalone-components).
1029
1032
  */
1030
1033
  standalone?: boolean;
1031
1034
  /**
@@ -1035,6 +1038,9 @@ export declare interface Component extends Directive {
1035
1038
  *
1036
1039
  * This property is only available for standalone components - specifying it for components
1037
1040
  * declared in an NgModule generates a compilation error.
1041
+ *
1042
+ * More information about standalone components, directives and pipes can be found in [this
1043
+ * guide](guide/standalone-components).
1038
1044
  */
1039
1045
  imports?: (Type<any> | any[])[];
1040
1046
  /**
@@ -1043,6 +1049,9 @@ export declare interface Component extends Directive {
1043
1049
  *
1044
1050
  * This property is only available for standalone components - specifying it for components
1045
1051
  * declared in an NgModule generates a compilation error.
1052
+ *
1053
+ * More information about standalone components, directives and pipes can be found in [this
1054
+ * guide](guide/standalone-components).
1046
1055
  */
1047
1056
  schemas?: SchemaMetadata[];
1048
1057
  }
@@ -2271,6 +2280,9 @@ export declare interface Directive {
2271
2280
  * Angular directives marked as `standalone` do not need to be declared in an NgModule. Such
2272
2281
  * directives don't depend on any "intermediate context" of an NgModule (ex. configured
2273
2282
  * providers).
2283
+ *
2284
+ * More information about standalone components, directives and pipes can be found in [this
2285
+ * guide](guide/standalone-components).
2274
2286
  */
2275
2287
  standalone?: boolean;
2276
2288
  }
@@ -3538,30 +3550,24 @@ export declare interface Inject {
3538
3550
  export declare const Inject: InjectDecorator;
3539
3551
 
3540
3552
  /**
3541
- * Injects a token from the currently active injector.
3542
- *
3543
- * Must be used in the context of a factory function such as one defined for an
3544
- * `InjectionToken`. Throws an error if not called from such a context.
3545
- *
3546
- * Within such a factory function, using this function to request injection of a dependency
3547
- * is faster and more type-safe than providing an additional array of dependencies
3548
- * (as has been common with `useFactory` providers).
3549
- *
3550
- * @param token The injection token for the dependency to be injected.
3551
- * @param flags Optional flags that control how injection is executed.
3552
- * The flags correspond to injection strategies that can be specified with
3553
- * parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`.
3554
- * @returns the injected value if injection is successful, `null` otherwise.
3555
- *
3556
- * @usageNotes
3553
+ * @param token A token that represents a dependency that should be injected.
3554
+ * @returns the injected value if operation is successful, `null` otherwise.
3555
+ * @throws if called outside of a supported context.
3557
3556
  *
3558
- * ### Example
3559
- *
3560
- * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}
3557
+ * @publicApi
3558
+ */
3559
+ export declare function inject<T>(token: ProviderToken<T>): T;
3560
+
3561
+ /**
3562
+ * @param token A token that represents a dependency that should be injected.
3563
+ * @param flags Control how injection is executed. The flags correspond to injection strategies that
3564
+ * can be specified with parameter decorators `@Host`, `@Self`, `@SkipSelf`, and `@Optional`.
3565
+ * @returns the injected value if operation is successful, `null` otherwise.
3566
+ * @throws if called outside of a supported context.
3561
3567
  *
3562
3568
  * @publicApi
3563
3569
  */
3564
- export declare const inject: typeof ɵɵinject;
3570
+ export declare function inject<T>(token: ProviderToken<T>, flags?: InjectFlags): T | null;
3565
3571
 
3566
3572
  /**
3567
3573
  * Type of the Injectable metadata.
@@ -5602,6 +5608,9 @@ export declare interface Pipe {
5602
5608
  /**
5603
5609
  * Angular pipes marked as `standalone` do not need to be declared in an NgModule. Such
5604
5610
  * pipes don't depend on any "intermediate context" of an NgModule (ex. configured providers).
5611
+ *
5612
+ * More information about standalone components, directives and pipes can be found in [this
5613
+ * guide](guide/standalone-components).
5605
5614
  */
5606
5615
  standalone?: boolean;
5607
5616
  }
@@ -6984,7 +6993,7 @@ declare const enum RuntimeErrorCode {
6984
6993
  CYCLIC_DI_DEPENDENCY = -200,
6985
6994
  PROVIDER_NOT_FOUND = -201,
6986
6995
  INVALID_FACTORY_DEPENDENCY = 202,
6987
- MISSING_INJECTION_CONTEXT = 203,
6996
+ MISSING_INJECTION_CONTEXT = -203,
6988
6997
  INVALID_INJECTION_TOKEN = 204,
6989
6998
  INJECTOR_ALREADY_DESTROYED = 205,
6990
6999
  PROVIDER_IN_WRONG_CONTEXT = 207,
@@ -12598,10 +12607,7 @@ export declare function ɵɵi18nStart(index: number, messageIndex: number, subTe
12598
12607
  export declare function ɵɵInheritDefinitionFeature(definition: ɵDirectiveDef<any> | ɵComponentDef<any>): void;
12599
12608
 
12600
12609
  /**
12601
- * Generated instruction: Injects a token from the currently active injector.
12602
- *
12603
- * Must be used in the context of a factory function such as one defined for an
12604
- * `InjectionToken`. Throws an error if not called from such a context.
12610
+ * Generated instruction: injects a token from the currently active injector.
12605
12611
  *
12606
12612
  * (Additional documentation moved to `inject`, as it is the public API, and an alias for this
12607
12613
  * instruction)
@@ -13785,7 +13791,7 @@ export declare function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string
13785
13791
  *
13786
13792
  * @codeGenApi
13787
13793
  */
13788
- export declare function ɵɵsetComponentScope(type: ɵComponentType<any>, directives: Type<any>[], pipes: Type<any>[]): void;
13794
+ export declare function ɵɵsetComponentScope(type: ɵComponentType<any>, directives: Type<any>[] | (() => Type<any>[]), pipes: Type<any>[] | (() => Type<any>[])): void;
13789
13795
 
13790
13796
  /**
13791
13797
  * Adds the module metadata that is necessary to compute the module's transitive scope to an
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "14.0.0-rc.2",
3
+ "version": "14.0.0-rc.3",
4
4
  "description": "Angular - the core framework",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.0.0-rc.2
2
+ * @license Angular v14.0.0-rc.3
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -187,7 +187,10 @@ export declare function flushMicrotasks(): void;
187
187
  export declare const getTestBed: () => TestBed;
188
188
 
189
189
  /**
190
- * Allows injecting dependencies in `beforeEach()` and `it()`.
190
+ * Allows injecting dependencies in `beforeEach()` and `it()`. Note: this function
191
+ * (imported from the `@angular/core/testing` package) can **only** be used to inject dependencies
192
+ * in tests. To inject dependencies in your application code, use the [`inject`](api/core/inject)
193
+ * function from the `@angular/core` package instead.
191
194
  *
192
195
  * Example:
193
196
  *