Skip to content

Conversation

@jamOne-
Copy link
Contributor

@jamOne- jamOne- commented Nov 21, 2025

Most important:

  • In MatTableDataSource: Require T to extend from object, so the filtering works correctly.

Other changes should be harmless.

@jamOne- jamOne- marked this pull request as ready for review November 21, 2025 16:29
@jamOne- jamOne- requested a review from a team as a code owner November 21, 2025 16:29
@jamOne- jamOne- requested review from adolgachev and ok7sai and removed request for a team November 21, 2025 16:29
@jamOne-
Copy link
Contributor Author

jamOne- commented Nov 21, 2025

@andrewseguin PTAL

@jamOne-
Copy link
Contributor Author

jamOne- commented Nov 28, 2025

@andrewseguin apparently narrowing the MatTableDataSource type is a breaking change. WDYT how should we proceed with this?

/** Updates the tooltip class */
private _setTooltipClass(tooltipClass: string | string[] | Set<string> | {[key: string]: any}) {
private _setTooltipClass(
tooltipClass: string | string[] | Set<string> | {[key: string]: unknown},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the intent is to have the final type be similar to Angular's class binding where there's a map of strings to booleans. Let's use boolean instead of unknown

https://angular.dev/guide/templates/binding#css-classes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

boolean would not be the most accurate, as the type in the docs is Record<string, any>.

IIUC the meaning of any is that we allow for actually any type, because we'll covert it to boolean.
Nonetheless I believe unknown is a safer choice here, as it would still allow for the flexibility of passing actually anything, with the difference that our code cannot use this value with other contexts (different than unknown or any) without an explicit cast.

@andrewseguin andrewseguin self-assigned this Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants