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

equals issue with Generic interface #97

Open
ArashMotamedi opened this issue Mar 23, 2021 · 0 comments
Open

equals issue with Generic interface #97

ArashMotamedi opened this issue Mar 23, 2021 · 0 comments

Comments

@ArashMotamedi
Copy link

Should equals be able to process a generic nested property of a generic interface? I'm getting false when trying to evaluate the following object:

interface Int1<T> {
    partial: Partial<T>
}

interface Int2 {
    prop1: string;
    prop2: string;
}

const obj = {
    partial: { prop1: "hi" }
}

equals<Int1<Int2>>(obj); // false (should be true)
equals<Int1<Int2>["partial"]>(obj["partial"]); // true, as expected

By the way, if this issue is related to the other one I opened yesterday, happy to consolidate or close the other one.

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

No branches or pull requests

1 participant