Skip to content

refactor(cdk/a11y): explicitly add Provider type #30393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/cdk/a11y/key-manager/noop-tree-key-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
TreeKeyManagerItem,
TreeKeyManagerStrategy,
} from './tree-key-manager-strategy';
import {Provider} from '@angular/core';

// NoopTreeKeyManager is a "noop" implementation of TreeKeyMangerStrategy. Methods are noops. Does
// not emit to streams.
Expand Down Expand Up @@ -102,7 +103,7 @@ export function NOOP_TREE_KEY_MANAGER_FACTORY<
*
* @breaking-change 21.0.0
*/
export const NOOP_TREE_KEY_MANAGER_FACTORY_PROVIDER = {
export const NOOP_TREE_KEY_MANAGER_FACTORY_PROVIDER: Provider = {
provide: TREE_KEY_MANAGER,
useFactory: NOOP_TREE_KEY_MANAGER_FACTORY,
};
6 changes: 2 additions & 4 deletions tools/public_api_guard/cdk/a11y.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { NgZone } from '@angular/core';
import { Observable } from 'rxjs';
import { OnChanges } from '@angular/core';
import { OnDestroy } from '@angular/core';
import { Provider } from '@angular/core';
import { QueryList } from '@angular/core';
import { Signal } from '@angular/core';
import { SimpleChanges } from '@angular/core';
Expand Down Expand Up @@ -430,10 +431,7 @@ export const MESSAGES_CONTAINER_ID = "cdk-describedby-message-container";
export function NOOP_TREE_KEY_MANAGER_FACTORY<T extends TreeKeyManagerItem>(): TreeKeyManagerFactory<T>;

// @public @deprecated
export const NOOP_TREE_KEY_MANAGER_FACTORY_PROVIDER: {
provide: InjectionToken<TreeKeyManagerFactory<any>>;
useFactory: typeof NOOP_TREE_KEY_MANAGER_FACTORY;
};
export const NOOP_TREE_KEY_MANAGER_FACTORY_PROVIDER: Provider;

// @public @deprecated
export class NoopTreeKeyManager<T extends TreeKeyManagerItem> implements TreeKeyManagerStrategy<T> {
Expand Down
Loading