Skip to content

equals issue with Generic interface #97

@ArashMotamedi

Description

@ArashMotamedi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions