Skip to content

Commit

Permalink
feat(core): mark signal-based query APIs as stable (#57921)
Browse files Browse the repository at this point in the history
This commit marks the contentChild, contentChildren, viewChild
and viewChildren APIs (along with any associated APIs) as stable
and thus exits the dev preview
phase for those APIs.

PR Close #57921
  • Loading branch information
pkozlowski-opensource committed Sep 24, 2024
1 parent 48216a2 commit a7eff3f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 0 additions & 2 deletions adev/src/content/guide/signals/queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ There are two categories of query: view queries and content queries.

Signal queries supply query results as a reactive signal primitive. You can use query results in `computed` and `effect`, composing these results with other signals.

IMPORTANT: Signal queries are in [developer preview](reference/releases#developer-preview). APIs may change based on feedback without going through Angular's deprecation cycle.

If you're already familiar with Angular queries, you can jump straight to [Comparing signal-based queries to decorator-based queries](#comparing-signal-based-queries-to-decorator-based-queries)

## View queries
Expand Down
18 changes: 9 additions & 9 deletions packages/core/src/authoring/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ function viewChildRequiredFn<LocatorT, ReadT>(
* It is a special function that also provides access to required query results via the `.required`
* property.
*
* @developerPreview
* @publicAPI
* @docsPrivate Ignored because `viewChild` is the canonical API entry.
*/
export interface ViewChildFunction {
/**
* Initializes a view child query. Consider using `viewChild.required` for queries that should
* always match.
*
* @developerPreview
* @publicAPI
*/
<LocatorT>(locator: ProviderToken<LocatorT> | string): Signal<LocatorT | undefined>;
<LocatorT, ReadT>(
Expand All @@ -56,7 +56,7 @@ export interface ViewChildFunction {
/**
* Initializes a view child query that is expected to always match an element.
*
* @developerPreview
* @publicAPI
*/
required: {
<LocatorT>(locator: ProviderToken<LocatorT> | string): Signal<LocatorT>;
Expand Down Expand Up @@ -87,7 +87,7 @@ export interface ViewChildFunction {
* }
* ```
*
* @developerPreview
* @publicAPI
* @initializerApiFunction
*/
export const viewChild: ViewChildFunction = (() => {
Expand Down Expand Up @@ -124,7 +124,7 @@ export function viewChildren<LocatorT, ReadT>(
* ```
*
* @initializerApiFunction
* @developerPreview
* @publicAPI
*/
export function viewChildren<LocatorT, ReadT>(
locator: ProviderToken<LocatorT> | string,
Expand Down Expand Up @@ -156,15 +156,15 @@ function contentChildRequiredFn<LocatorT, ReadT>(
* The contentChild function creates a singular content query. It is a special function that also
* provides access to required query results via the `.required` property.
*
* @developerPreview
* @publicAPI
* @docsPrivate Ignored because `contentChild` is the canonical API entry.
*/
export interface ContentChildFunction {
/**
* Initializes a content child query.
*
* Consider using `contentChild.required` for queries that should always match.
* @developerPreview
* @publicAPI
*/
<LocatorT>(
locator: ProviderToken<LocatorT> | string,
Expand Down Expand Up @@ -220,7 +220,7 @@ export interface ContentChildFunction {
* ```
*
* @initializerApiFunction
* @developerPreview
* @publicAPI
*/
export const contentChild: ContentChildFunction = (() => {
// Note: This may be considered a side-effect, but nothing will depend on
Expand Down Expand Up @@ -257,7 +257,7 @@ export function contentChildren<LocatorT, ReadT>(
* ```
*
* @initializerApiFunction
* @developerPreview
* @publicAPI
*/
export function contentChildren<LocatorT, ReadT>(
locator: ProviderToken<LocatorT> | string,
Expand Down

0 comments on commit a7eff3f

Please sign in to comment.