@angular/core 17.3.0-next.0 → 17.3.0-rc.0

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.
Files changed (64) hide show
  1. package/esm2022/rxjs-interop/src/index.mjs +3 -1
  2. package/esm2022/rxjs-interop/src/output_from_observable.mjs +68 -0
  3. package/esm2022/rxjs-interop/src/output_to_observable.mjs +29 -0
  4. package/esm2022/rxjs-interop/src/to_observable.mjs +1 -1
  5. package/esm2022/src/application/application_ref.mjs +66 -40
  6. package/esm2022/src/authoring/input/input_type_checking.mjs +1 -1
  7. package/esm2022/src/authoring/model/model.mjs +4 -1
  8. package/esm2022/src/authoring/model/model_signal.mjs +9 -18
  9. package/esm2022/src/authoring/output/output.mjs +35 -0
  10. package/esm2022/src/authoring/output/output_emitter_ref.mjs +74 -0
  11. package/esm2022/src/authoring/output/output_ref.mjs +9 -0
  12. package/esm2022/src/authoring.mjs +3 -2
  13. package/esm2022/src/cached_injector_service.mjs +49 -0
  14. package/esm2022/src/core_private_export.mjs +4 -2
  15. package/esm2022/src/defer/instructions.mjs +29 -3
  16. package/esm2022/src/defer/interfaces.mjs +1 -1
  17. package/esm2022/src/di/host_attribute_token.mjs +40 -0
  18. package/esm2022/src/di/index.mjs +2 -1
  19. package/esm2022/src/di/injector_compatibility.mjs +3 -1
  20. package/esm2022/src/di/interface/provider.mjs +1 -1
  21. package/esm2022/src/di/metadata.mjs +1 -1
  22. package/esm2022/src/di/r3_injector.mjs +26 -15
  23. package/esm2022/src/errors.mjs +1 -1
  24. package/esm2022/src/event_emitter.mjs +19 -2
  25. package/esm2022/src/hydration/api.mjs +2 -2
  26. package/esm2022/src/is_internal.mjs +15 -0
  27. package/esm2022/src/render3/after_render_hooks.mjs +9 -6
  28. package/esm2022/src/render3/component_ref.mjs +103 -93
  29. package/esm2022/src/render3/instructions/listener.mjs +7 -9
  30. package/esm2022/src/render3/instructions/render.mjs +3 -2
  31. package/esm2022/src/render3/interfaces/view.mjs +1 -1
  32. package/esm2022/src/render3/node_manipulation.mjs +13 -4
  33. package/esm2022/src/render3/queue_state_update.mjs +41 -0
  34. package/esm2022/src/render3/reactivity/computed.mjs +3 -1
  35. package/esm2022/src/render3/reactivity/effect.mjs +13 -7
  36. package/esm2022/src/render3/reactivity/signal.mjs +5 -4
  37. package/esm2022/src/render3/view_manipulation.mjs +24 -17
  38. package/esm2022/src/util/assert.mjs +7 -1
  39. package/esm2022/src/version.mjs +1 -1
  40. package/esm2022/testing/src/component_fixture.mjs +78 -19
  41. package/esm2022/testing/src/logger.mjs +3 -3
  42. package/esm2022/testing/src/test_bed_compiler.mjs +26 -4
  43. package/fesm2022/core.mjs +13346 -13065
  44. package/fesm2022/core.mjs.map +1 -1
  45. package/fesm2022/primitives/signals.mjs +1 -1
  46. package/fesm2022/rxjs-interop.mjs +82 -3
  47. package/fesm2022/rxjs-interop.mjs.map +1 -1
  48. package/fesm2022/testing.mjs +102 -21
  49. package/fesm2022/testing.mjs.map +1 -1
  50. package/index.d.ts +219 -78
  51. package/package.json +1 -1
  52. package/primitives/signals/index.d.ts +1 -1
  53. package/rxjs-interop/index.d.ts +39 -1
  54. package/schematics/migrations/block-template-entities/bundle.js +19 -34
  55. package/schematics/migrations/block-template-entities/bundle.js.map +3 -3
  56. package/schematics/migrations/invalid-two-way-bindings/bundle.js +26381 -0
  57. package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +7 -0
  58. package/schematics/migrations.json +5 -0
  59. package/schematics/ng-generate/control-flow-migration/bundle.js +21 -36
  60. package/schematics/ng-generate/control-flow-migration/bundle.js.map +3 -3
  61. package/schematics/ng-generate/standalone-migration/bundle.js +6201 -3670
  62. package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
  63. package/testing/index.d.ts +1 -1
  64. package/esm2022/src/authoring/output.mjs +0 -33
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.3.0-next.0
2
+ * @license Angular v17.3.0-rc.0
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -644,6 +644,9 @@ export declare class ApplicationRef {
644
644
  private _destroyListeners;
645
645
  private readonly internalErrorHandler;
646
646
  private readonly afterRenderEffectManager;
647
+ private externalTestViews;
648
+ private beforeRender;
649
+ private afterTick;
647
650
  /**
648
651
  * Indicates whether this instance was destroyed.
649
652
  */
@@ -757,7 +760,6 @@ export declare class ApplicationRef {
757
760
  */
758
761
  tick(): void;
759
762
  private detectChangesInAttachedViews;
760
- private detectChangesInView;
761
763
  /**
762
764
  * Attaches a view so that it will be dirty checked.
763
765
  * The view will be automatically detached when it is destroyed.
@@ -1104,7 +1106,7 @@ declare interface ClassDebugInfo {
1104
1106
 
1105
1107
  /**
1106
1108
  * Configures the `Injector` to return an instance of `useClass` for a token.
1107
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
1109
+ * @see [Dependency Injection Guide](guide/dependency-injection).
1108
1110
  *
1109
1111
  * @usageNotes
1110
1112
  *
@@ -1136,7 +1138,7 @@ export declare interface ClassProvider extends ClassSansProvider {
1136
1138
  * Configures the `Injector` to return a value by invoking a `useClass` function.
1137
1139
  * Base for `ClassProvider` decorator.
1138
1140
  *
1139
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
1141
+ * @see [Dependency Injection Guide](guide/dependency-injection).
1140
1142
  *
1141
1143
  * @publicApi
1142
1144
  */
@@ -1817,7 +1819,7 @@ export declare function computed<T>(computation: () => T, options?: CreateComput
1817
1819
  /**
1818
1820
  * Configures the `Injector` to return an instance of a token.
1819
1821
  *
1820
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
1822
+ * @see [Dependency Injection Guide](guide/dependency-injection).
1821
1823
  *
1822
1824
  * @usageNotes
1823
1825
  *
@@ -1844,7 +1846,7 @@ export declare interface ConstructorProvider extends ConstructorSansProvider {
1844
1846
  /**
1845
1847
  * Configures the `Injector` to return an instance of a token.
1846
1848
  *
1847
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
1849
+ * @see [Dependency Injection Guide](guide/dependency-injection).
1848
1850
  *
1849
1851
  * @usageNotes
1850
1852
  *
@@ -3801,7 +3803,7 @@ export declare class ErrorHandler {
3801
3803
  * @see [Observables in Angular](guide/observables-in-angular)
3802
3804
  * @publicApi
3803
3805
  */
3804
- export declare interface EventEmitter<T> extends Subject<T> {
3806
+ export declare interface EventEmitter<T> extends Subject<T>, OutputRef<T> {
3805
3807
  /**
3806
3808
  * Creates an instance of this class that can
3807
3809
  * deliver events synchronously or asynchronously.
@@ -3846,7 +3848,7 @@ export declare const EventEmitter: {
3846
3848
  /**
3847
3849
  * Configures the `Injector` to return a value of another `useExisting` token.
3848
3850
  *
3849
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
3851
+ * @see [Dependency Injection Guide](guide/dependency-injection).
3850
3852
  *
3851
3853
  * @usageNotes
3852
3854
  *
@@ -3874,7 +3876,7 @@ export declare interface ExistingProvider extends ExistingSansProvider {
3874
3876
  * Configures the `Injector` to return a value of another `useExisting` token.
3875
3877
  *
3876
3878
  * @see {@link ExistingProvider}
3877
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
3879
+ * @see [Dependency Injection Guide](guide/dependency-injection).
3878
3880
  *
3879
3881
  * @publicApi
3880
3882
  */
@@ -3902,7 +3904,7 @@ declare type FactoryFn<T> = {
3902
3904
 
3903
3905
  /**
3904
3906
  * Configures the `Injector` to return a value by invoking a `useFactory` function.
3905
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
3907
+ * @see [Dependency Injection Guide](guide/dependency-injection).
3906
3908
  *
3907
3909
  * @usageNotes
3908
3910
  *
@@ -3934,7 +3936,7 @@ export declare interface FactoryProvider extends FactorySansProvider {
3934
3936
  * Configures the `Injector` to return a value by invoking a `useFactory` function.
3935
3937
  *
3936
3938
  * @see {@link FactoryProvider}
3937
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
3939
+ * @see [Dependency Injection Guide](guide/dependency-injection).
3938
3940
  *
3939
3941
  * @publicApi
3940
3942
  */
@@ -4314,6 +4316,33 @@ export declare interface Host {
4314
4316
  */
4315
4317
  export declare const Host: HostDecorator;
4316
4318
 
4319
+ /**
4320
+ * Creates a token that can be used to inject static attributes of the host node.
4321
+ *
4322
+ * @usageNotes
4323
+ * ### Injecting an attribute that is known to exist
4324
+ * ```typescript
4325
+ * @Directive()
4326
+ * class MyDir {
4327
+ * attr: string = inject(new HostAttributeToken('some-attr'));
4328
+ * }
4329
+ * ```
4330
+ *
4331
+ * ### Optionally injecting an attribute
4332
+ * ```typescript
4333
+ * @Directive()
4334
+ * class MyDir {
4335
+ * attr: string | null = inject(new HostAttributeToken('some-attr'), {optional: true});
4336
+ * }
4337
+ * ```
4338
+ * @publicApi
4339
+ */
4340
+ export declare class HostAttributeToken {
4341
+ private attributeName;
4342
+ constructor(attributeName: string);
4343
+ toString(): string;
4344
+ }
4345
+
4317
4346
  /**
4318
4347
  * Type of the HostBinding metadata.
4319
4348
  *
@@ -5018,6 +5047,37 @@ export declare function inject<T>(token: ProviderToken<T>, options: InjectOption
5018
5047
  */
5019
5048
  export declare function inject<T>(token: ProviderToken<T>, options: InjectOptions): T | null;
5020
5049
 
5050
+ /**
5051
+ * @param token A token that represents a static attribute on the host node that should be injected.
5052
+ * @returns Value of the attribute if it exists.
5053
+ * @throws If called outside of a supported context or the attribute does not exist.
5054
+ *
5055
+ * @publicApi
5056
+ */
5057
+ export declare function inject(token: HostAttributeToken): string;
5058
+
5059
+ /**
5060
+ * @param token A token that represents a static attribute on the host node that should be injected.
5061
+ * @returns Value of the attribute if it exists, otherwise `null`.
5062
+ * @throws If called outside of a supported context.
5063
+ *
5064
+ * @publicApi
5065
+ */
5066
+ export declare function inject(token: HostAttributeToken, options: {
5067
+ optional: true;
5068
+ }): string | null;
5069
+
5070
+ /**
5071
+ * @param token A token that represents a static attribute on the host node that should be injected.
5072
+ * @returns Value of the attribute if it exists.
5073
+ * @throws If called outside of a supported context or the attribute does not exist.
5074
+ *
5075
+ * @publicApi
5076
+ */
5077
+ export declare function inject(token: HostAttributeToken, options: {
5078
+ optional: false;
5079
+ }): string;
5080
+
5021
5081
  /**
5022
5082
  * Type of the Injectable metadata.
5023
5083
  *
@@ -5131,7 +5191,7 @@ export declare interface InjectDecorator {
5131
5191
  * <code-example path="core/di/ts/metadata_spec.ts" region="InjectWithoutDecorator">
5132
5192
  * </code-example>
5133
5193
  *
5134
- * @see ["Dependency Injection Guide"](guide/dependency-injection)
5194
+ * @see [Dependency Injection Guide](guide/dependency-injection)
5135
5195
  *
5136
5196
  */
5137
5197
  (token: any): any;
@@ -5695,6 +5755,12 @@ declare interface InternalAfterNextRenderOptions {
5695
5755
  * If this is not provided, the current injection context will be used instead (via `inject`).
5696
5756
  */
5697
5757
  injector?: Injector;
5758
+ /**
5759
+ * When true, the hook will execute both on client and on the server.
5760
+ *
5761
+ * When false or undefined, the hook only executes in the browser.
5762
+ */
5763
+ runOnServer?: boolean;
5698
5764
  }
5699
5765
 
5700
5766
  /**
@@ -6731,12 +6797,10 @@ export declare interface ModelOptions {
6731
6797
  *
6732
6798
  * @developerPreview
6733
6799
  */
6734
- export declare interface ModelSignal<T> extends WritableSignal<T> {
6800
+ export declare interface ModelSignal<T> extends WritableSignal<T>, OutputRef<T> {
6735
6801
  [SIGNAL]: InputSignalNode<T, T>;
6736
6802
  [ɵINPUT_SIGNAL_BRAND_READ_TYPE]: T;
6737
6803
  [ɵINPUT_SIGNAL_BRAND_WRITE_TYPE]: T;
6738
- /** @deprecated Do not use, will be removed. */
6739
- subscribe(callback: (value: T) => void): () => void;
6740
6804
  }
6741
6805
 
6742
6806
  /**
@@ -7477,7 +7541,7 @@ export declare interface OptionalDecorator {
7477
7541
  * <code-example path="core/di/ts/metadata_spec.ts" region="Optional">
7478
7542
  * </code-example>
7479
7543
  *
7480
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
7544
+ * @see [Dependency Injection Guide](guide/dependency-injection).
7481
7545
  */
7482
7546
  (): any;
7483
7547
  new (): Optional;
@@ -7501,6 +7565,29 @@ export declare interface Output {
7501
7565
  */
7502
7566
  export declare const Output: OutputDecorator;
7503
7567
 
7568
+ /**
7569
+ * The `outputs` function allows declaration of outputs in directives and
7570
+ * components.
7571
+ *
7572
+ * Initializes an output that can emit values to consumers of your
7573
+ * directive/component.
7574
+ *
7575
+ * @usageNotes
7576
+ * Initialize an output in your directive by declaring a
7577
+ * class field and initializing it with the `output()` function.
7578
+ *
7579
+ * ```ts
7580
+ * @Directive({..})
7581
+ * export class MyDir {
7582
+ * nameChange = output<string>(); // OutputEmitterRef<string>
7583
+ * onClick = output(); // OutputEmitterRef<void>
7584
+ * }
7585
+ * ```
7586
+ *
7587
+ * @developerPreview
7588
+ */
7589
+ export declare function output<T = void>(opts?: OutputOptions): OutputEmitterRef<T>;
7590
+
7504
7591
  /**
7505
7592
  * Type of the Output decorator / constructor function.
7506
7593
  *
@@ -7527,6 +7614,67 @@ export declare interface OutputDecorator {
7527
7614
  new (alias?: string): any;
7528
7615
  }
7529
7616
 
7617
+ /**
7618
+ * An `OutputEmitterRef` is created by the `output()` function and can be
7619
+ * used to emit values to consumers of your directive or component.
7620
+ *
7621
+ * Consumers of your directive/component can bind to the output and
7622
+ * subscribe to changes via the bound event syntax. For example:
7623
+ *
7624
+ * ```html
7625
+ * <my-comp (valueChange)="processNewValue($event)" />
7626
+ * ```
7627
+ *
7628
+ * @developerPreview
7629
+ */
7630
+ export declare class OutputEmitterRef<T> implements OutputRef<T> {
7631
+ private destroyed;
7632
+ private listeners;
7633
+ constructor();
7634
+ subscribe(callback: (value: T) => void): OutputRefSubscription;
7635
+ /** Emits a new value to the output. */
7636
+ emit(value: T): void;
7637
+ }
7638
+
7639
+ /**
7640
+ * Options for declaring an output.
7641
+ *
7642
+ * @developerPreview
7643
+ */
7644
+ export declare interface OutputOptions {
7645
+ alias?: string;
7646
+ }
7647
+
7648
+ /**
7649
+ * A reference to an Angular output.
7650
+ *
7651
+ * @developerPreview
7652
+ */
7653
+ export declare interface OutputRef<T> {
7654
+ /**
7655
+ * Registers a callback that is invoked whenever the output
7656
+ * emits a new value of type `T`.
7657
+ *
7658
+ * Angular will automatically clean up the subscription when
7659
+ * the directive/component of the output is destroyed.
7660
+ */
7661
+ subscribe(callback: (value: T) => void): OutputRefSubscription;
7662
+ }
7663
+
7664
+
7665
+ /**
7666
+ * Function that can be used to manually clean up a
7667
+ * programmatic {@link OutputRef#subscribe} subscription.
7668
+ *
7669
+ * Note: Angular will automatically clean up subscriptions
7670
+ * when the directive/component of the output is destroyed.
7671
+ *
7672
+ * @developerPreview
7673
+ */
7674
+ export declare interface OutputRefSubscription {
7675
+ unsubscribe(): void;
7676
+ }
7677
+
7530
7678
  /**
7531
7679
  * A [DI token](guide/glossary#di-token "DI token definition") that indicates the root directory of
7532
7680
  * the application
@@ -7799,7 +7947,7 @@ declare type ProjectionSlots = (ɵCssSelectorList | '*')[];
7799
7947
 
7800
7948
  /**
7801
7949
  * Describes how the `Injector` should be configured.
7802
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
7950
+ * @see [Dependency Injection Guide](guide/dependency-injection).
7803
7951
  *
7804
7952
  * @see {@link StaticProvider}
7805
7953
  *
@@ -9024,7 +9172,7 @@ export declare type StateKey<T> = string & {
9024
9172
 
9025
9173
  /**
9026
9174
  * Configures the `Injector` to return an instance of `useClass` for a token.
9027
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
9175
+ * @see [Dependency Injection Guide](guide/dependency-injection).
9028
9176
  *
9029
9177
  * @usageNotes
9030
9178
  *
@@ -9076,7 +9224,7 @@ export declare interface StaticClassSansProvider {
9076
9224
  * A static provider provides tokens to an injector for various types of dependencies.
9077
9225
  *
9078
9226
  * @see {@link Injector.create()}
9079
- * @see ["Dependency Injection Guide"](guide/dependency-injection-providers).
9227
+ * @see [Dependency Injection Guide](guide/dependency-injection-providers).
9080
9228
  *
9081
9229
  * @publicApi
9082
9230
  */
@@ -9208,6 +9356,11 @@ declare interface TDeferBlockDetails {
9208
9356
  * which all await the same set of dependencies.
9209
9357
  */
9210
9358
  loadingPromise: Promise<unknown> | null;
9359
+ /**
9360
+ * List of providers collected from all NgModules that were imported by
9361
+ * standalone components used within this defer block.
9362
+ */
9363
+ providers: Provider[] | null;
9211
9364
  }
9212
9365
 
9213
9366
  /** Static data for an <ng-container> */
@@ -10768,7 +10921,7 @@ export declare type ValueEqualityFn<T> = (a: T, b: T) => boolean;
10768
10921
 
10769
10922
  /**
10770
10923
  * Configures the `Injector` to return a value for a token.
10771
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
10924
+ * @see [Dependency Injection Guide](guide/dependency-injection).
10772
10925
  *
10773
10926
  * @usageNotes
10774
10927
  *
@@ -11341,14 +11494,11 @@ declare interface ViewRefTracker {
11341
11494
  detachView(viewRef: ViewRef): void;
11342
11495
  }
11343
11496
 
11344
- /** Symbol used distinguish `WritableSignal` from other non-writable signals and functions. */
11345
- declare const WRITABLE_SIGNAL: unique symbol;
11346
-
11347
11497
  /**
11348
11498
  * A `Signal` with a value that can be mutated via a setter interface.
11349
11499
  */
11350
11500
  export declare interface WritableSignal<T> extends Signal<T> {
11351
- [WRITABLE_SIGNAL]: T;
11501
+ [ɵWRITABLE_SIGNAL]: T;
11352
11502
  /**
11353
11503
  * Directly set the signal to a new value, and notify any dependents.
11354
11504
  */
@@ -11360,7 +11510,7 @@ export declare interface WritableSignal<T> extends Signal<T> {
11360
11510
  update(updateFn: (value: T) => T): void;
11361
11511
  /**
11362
11512
  * Returns a readonly version of this signal. Readonly signals can be accessed to read their value
11363
- * but can't be changed using set, update or mutate methods. The readonly signals do _not_ have
11513
+ * but can't be changed using set or update methods. The readonly signals do _not_ have
11364
11514
  * any built-in mechanism that would prevent deep-mutation of their value.
11365
11515
  */
11366
11516
  asReadonly(): Signal<T>;
@@ -11381,9 +11531,10 @@ export declare function ɵ_sanitizeUrl(url: string): string;
11381
11531
  */
11382
11532
  export declare class ɵAfterRenderEventManager {
11383
11533
  /**
11384
- * Executes callbacks. Returns `true` if any callbacks executed.
11534
+ * Executes internal and user-provided callbacks.
11385
11535
  */
11386
11536
  execute(): void;
11537
+ executeInternalCallbacks(): void;
11387
11538
  ngOnDestroy(): void;
11388
11539
  /** @nocollapse */
11389
11540
  static ɵprov: unknown;
@@ -11944,6 +12095,8 @@ export declare enum ɵDeferBlockState {
11944
12095
  /** The deps tracker to be used in the current Angular app in dev mode. */
11945
12096
  export declare const ɵdepsTracker: DepsTracker;
11946
12097
 
12098
+ export declare function ɵdetectChangesInViewIfRequired(lView: LView, isFirstPass: boolean, notifyErrorHandler: boolean): void;
12099
+
11947
12100
 
11948
12101
  export declare function ɵdevModeEqual(a: any, b: any): boolean;
11949
12102
 
@@ -12268,6 +12421,9 @@ export declare function ɵgetLocaleCurrencyCode(locale: string): string | null;
12268
12421
  */
12269
12422
  export declare function ɵgetLocalePluralCase(locale: string): (value: number) => number;
12270
12423
 
12424
+ /** Gets the owning `DestroyRef` for the given output. */
12425
+ export declare function ɵgetOutputDestroyRef(ref: OutputRef<unknown>): DestroyRef | undefined;
12426
+
12271
12427
  export declare function ɵgetSanitizationBypassType(value: any): ɵBypassType | null;
12272
12428
 
12273
12429
  /**
@@ -12423,6 +12579,14 @@ export declare function ɵisComponentDefPendingResolution(type: Type<any>): bool
12423
12579
 
12424
12580
  export declare function ɵisEnvironmentProviders(value: Provider | EnvironmentProviders | ɵInternalEnvironmentProviders): value is ɵInternalEnvironmentProviders;
12425
12581
 
12582
+ /**
12583
+ * Used to patch behavior that needs to _temporarily_ be different between g3 and external.
12584
+ *
12585
+ * For example, make breaking changes ahead of the main branch targeting a major version.
12586
+ * Permanent differences between g3 and external should be configured by individual patches.
12587
+ */
12588
+ export declare const ɵisG3 = false;
12589
+
12426
12590
  export declare function ɵisInjectable(type: any): boolean;
12427
12591
 
12428
12592
  export declare function ɵisNgModule<T>(value: Type<T>): value is Type<T> & {
@@ -12669,56 +12833,6 @@ export declare function ɵnoSideEffects<T>(fn: () => T): T;
12669
12833
 
12670
12834
  export declare const ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR: {};
12671
12835
 
12672
- /**
12673
- * The `outputs` function allows declaration of outputs in directives and
12674
- * components.
12675
- *
12676
- * Initializes an output that can emit values to consumers of your
12677
- * directive/component.
12678
- *
12679
- * @usageNotes
12680
- * Initialize an output in your directive by declaring a
12681
- * class field and initializing it with the `output()` function.
12682
- *
12683
- * ```ts
12684
- * @Directive({..})
12685
- * export class MyDir {
12686
- * nameChange = output<string>(); // OutputEmitter<string>
12687
- * onClick = output(); // OutputEmitter<void>
12688
- * }
12689
- * ```
12690
- *
12691
- * @developerPreview
12692
- */
12693
- export declare function ɵoutput<T = void>(opts?: ɵOutputOptions): ɵOutputEmitter<T>;
12694
-
12695
-
12696
- /**
12697
- * An `OutputEmitter` is created by the `output()` function and can be
12698
- * used to emit values to consumers of your directive or component.
12699
- *
12700
- * Consumers of your directive/component can bind to the output and
12701
- * subscribe to changes via the bound event syntax. For example:
12702
- *
12703
- * ```html
12704
- * <my-comp (valueChange)="processNewValue($event)" />
12705
- * ```
12706
- *
12707
- * @developerPreview
12708
- */
12709
- export declare interface ɵOutputEmitter<T> {
12710
- emit(value: T): void;
12711
- }
12712
-
12713
- /**
12714
- * Options for declaring an output.
12715
- *
12716
- * @developerPreview
12717
- */
12718
- export declare interface ɵOutputOptions {
12719
- alias?: string;
12720
- }
12721
-
12722
12836
  /**
12723
12837
  * Patch the definition of a component with directives and pipes from the compilation scope of
12724
12838
  * a given module.
@@ -12878,6 +12992,23 @@ export declare interface ɵProviderRecord {
12878
12992
 
12879
12993
  export declare function ɵprovideZonelessChangeDetection(): EnvironmentProviders;
12880
12994
 
12995
+ /**
12996
+ * Queue a state update to be performed asynchronously.
12997
+ *
12998
+ * This is useful to safely update application state that is used in an expression that was already
12999
+ * checked during change detection. This defers the update until later and prevents
13000
+ * `ExpressionChangedAfterItHasBeenChecked` errors. Using signals for state is recommended instead,
13001
+ * but it's not always immediately possible to change the state to a signal because it would be a
13002
+ * breaking change. When the callback updates state used in an expression, this needs to be
13003
+ * accompanied by an explicit notification to the framework that something has changed (i.e.
13004
+ * updating a signal or calling `ChangeDetectorRef.markForCheck()`) or may still cause
13005
+ * `ExpressionChangedAfterItHasBeenChecked` in dev mode or fail to synchronize the state to the DOM
13006
+ * in production.
13007
+ */
13008
+ export declare function ɵqueueStateUpdate(callback: VoidFunction, options?: {
13009
+ injector?: Injector;
13010
+ }): void;
13011
+
12881
13012
  export declare function ɵreadHydrationInfo(node: RNode): ɵHydrationInfo | null;
12882
13013
 
12883
13014
  export declare class ɵReflectionCapabilities implements PlatformReflectionCapabilities {
@@ -13148,6 +13279,7 @@ export declare const enum ɵRuntimeErrorCode {
13148
13279
  REQUIRED_INPUT_NO_VALUE = -950,
13149
13280
  REQUIRED_QUERY_NO_VALUE = -951,
13150
13281
  REQUIRED_MODEL_NO_VALUE = -952,
13282
+ OUTPUT_REF_DESTROYED = 953,
13151
13283
  RUNTIME_DEPS_INVALID_IMPORTED_TYPE = 1000,
13152
13284
  RUNTIME_DEPS_ORPHAN_COMPONENT = 1001
13153
13285
  }
@@ -13346,7 +13478,7 @@ export declare type ɵUnwrapDirectiveSignalInputs<Dir, Fields extends keyof Dir>
13346
13478
  };
13347
13479
 
13348
13480
  /** Retrieves the `WriteT` of an `InputSignal` and `InputSignalWithTransform`. */
13349
- declare type ɵUnwrapInputSignalWriteType<Field> = Field extends InputSignalWithTransform<unknown, infer WriteT> ? WriteT : never;
13481
+ declare type ɵUnwrapInputSignalWriteType<Field> = Field extends InputSignalWithTransform<any, infer WriteT> ? WriteT : never;
13350
13482
 
13351
13483
  export declare function ɵunwrapSafeValue(value: ɵSafeValue): string;
13352
13484
 
@@ -13357,7 +13489,7 @@ export declare function ɵunwrapSafeValue<T>(value: T): T;
13357
13489
  * @codeGenApi
13358
13490
  */
13359
13491
  export declare function ɵunwrapWritableSignal<T>(value: T | {
13360
- [WRITABLE_SIGNAL]: T;
13492
+ [ɵWRITABLE_SIGNAL]: T;
13361
13493
  }): T;
13362
13494
 
13363
13495
  /**
@@ -13635,6 +13767,9 @@ export declare type ɵWritable<T> = {
13635
13767
  -readonly [K in keyof T]: T[K];
13636
13768
  };
13637
13769
 
13770
+ /** Symbol used distinguish `WritableSignal` from other non-writable signals and functions. */
13771
+ declare const ɵWRITABLE_SIGNAL: unique symbol;
13772
+
13638
13773
  /**
13639
13774
  * URL for the XSS security documentation.
13640
13775
  */
@@ -14997,6 +15132,12 @@ export declare function ɵɵinject<T>(token: ProviderToken<T>): T;
14997
15132
 
14998
15133
  export declare function ɵɵinject<T>(token: ProviderToken<T>, flags?: InjectFlags): T | null;
14999
15134
 
15135
+ export declare function ɵɵinject(token: HostAttributeToken): string;
15136
+
15137
+ export declare function ɵɵinject(token: HostAttributeToken, flags?: InjectFlags): string | null;
15138
+
15139
+ export declare function ɵɵinject<T>(token: ProviderToken<T> | HostAttributeToken, flags?: InjectFlags): string | null;
15140
+
15000
15141
  /**
15001
15142
  * Information about how a type or `InjectionToken` interfaces with the DI system.
15002
15143
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "17.3.0-next.0",
3
+ "version": "17.3.0-rc.0",
4
4
  "description": "Angular - the core framework",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.3.0-next.0
2
+ * @license Angular v17.3.0-rc.0
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.3.0-next.0
2
+ * @license Angular v17.3.0-rc.0
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -9,9 +9,47 @@ import { DestroyRef } from '@angular/core';
9
9
  import { Injector } from '@angular/core';
10
10
  import { MonoTypeOperatorFunction } from 'rxjs';
11
11
  import { Observable } from 'rxjs';
12
+ import { OutputOptions } from '@angular/core';
13
+ import { OutputRef } from '@angular/core';
12
14
  import { Signal } from '@angular/core';
13
15
  import { Subscribable } from 'rxjs';
14
16
 
17
+ /**
18
+ * Declares an Angular output that is using an RxJS observable as a source
19
+ * for events dispatched to parent subscribers.
20
+ *
21
+ * The behavior for an observable as source is defined as followed:
22
+ * 1. New values are forwarded to the Angular output (next notifications).
23
+ * 2. Errors notifications are not handled by Angular. You need to handle these manually.
24
+ * For example by using `catchError`.
25
+ * 3. Completion notifications stop the output from emitting new values.
26
+ *
27
+ * @usageNotes
28
+ * Initialize an output in your directive by declaring a
29
+ * class field and initializing it with the `outputFromObservable()` function.
30
+ *
31
+ * ```ts
32
+ * @Directive({..})
33
+ * export class MyDir {
34
+ * nameChange$ = <some-observable>;
35
+ * nameChange = outputFromObservable(this.nameChange$);
36
+ * }
37
+ * ```
38
+ *
39
+ * @developerPreview
40
+ */
41
+ export declare function outputFromObservable<T>(observable: Observable<T>, opts?: OutputOptions): OutputRef<T>;
42
+
43
+ /**
44
+ * Converts an Angular output declared via `output()` or `outputFromObservable()`
45
+ * to an observable.
46
+ *
47
+ * You can subscribe to the output via `Observable.subscribe` then.
48
+ *
49
+ * @developerPreview
50
+ */
51
+ export declare function outputToObservable<T>(ref: OutputRef<T>): Observable<T>;
52
+
15
53
  /**
16
54
  * Operator which completes the Observable when the calling context (component, directive, service,
17
55
  * etc) is destroyed.