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

tsify ColumnComparer #1576

Merged
merged 1 commit into from Apr 11, 2019
Merged

tsify ColumnComparer #1576

merged 1 commit into from Apr 11, 2019

Conversation

nstepien
Copy link
Contributor

We might want to revisit the types when we know more about how sameColumn is used.

@nstepien nstepien self-assigned this Apr 11, 2019
for (const k in a) {
if (a.hasOwnProperty(k)) {
const valA = a[k] as unknown;
const valB = b[k as string as keyof B] as unknown;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without the as string as keyof B part:
image

Without at least one as unknown:
image

@@ -0,0 +1,24 @@
import { isElement } from 'react-is';

export function sameColumn<A, B>(a: A, b: B): boolean {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should probably replace the generic types once we know how this function is used.

Copy link
Contributor

@amanmahajan7 amanmahajan7 left a comment

Choose a reason for hiding this comment

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

We need to understand the column metrics logic and if this function is needed or not.

@nstepien nstepien merged commit e30afe6 into next Apr 11, 2019
@nstepien nstepien deleted the columncomparer branch April 11, 2019 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants