Skip to content
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

[data grid] Consider using generic parameter as unknown instead of any in GridCellParams #5614

Closed
Tracked by #3287
joserodolfofreitas opened this issue Jul 26, 2022 · 1 comment · Fixed by #6959
Closed
Tracked by #3287
Assignees
Labels
breaking change component: data grid This is the name of the generic UI component, not the React module! v6.x

Comments

@joserodolfofreitas
Copy link
Member

Summary

Consider using V = unknown instead of V = any in GridCellParams (as per #4774 (comment))

export interface GridCellParams<V = any, R extends GridValidRowModel = any, F = V> {

Motivation

@joserodolfofreitas joserodolfofreitas added breaking change component: data grid This is the name of the generic UI component, not the React module! v6.x labels Jul 26, 2022
@joserodolfofreitas joserodolfofreitas changed the title Consider using V = unknown instead of V = any in GridCellParams Consider using generic parameter as unknown of any in GridCellParams Jul 26, 2022
@joserodolfofreitas joserodolfofreitas changed the title Consider using generic parameter as unknown of any in GridCellParams [data grid] Consider using generic parameter as unknown of any in GridCellParams Jul 26, 2022
@joserodolfofreitas joserodolfofreitas changed the title [data grid] Consider using generic parameter as unknown of any in GridCellParams [data grid] Consider using generic parameter as unknown or any in GridCellParams Jul 26, 2022
@TheRealCuran
Copy link

Personal opinion: please never use any, unknown is just strictly better. If you need to ensure a certain type at any point, use a type guard. See https://typescript-eslint.io/rules/no-explicit-any/ for additional information, why any is usually not a good idea.

@joserodolfofreitas joserodolfofreitas changed the title [data grid] Consider using generic parameter as unknown or any in GridCellParams [data grid] Consider using generic parameter as unknown instead of any in GridCellParams Sep 9, 2022
@cherniavskii cherniavskii self-assigned this Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change component: data grid This is the name of the generic UI component, not the React module! v6.x
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants