Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 608 Bytes

known_issues.md

File metadata and controls

37 lines (30 loc) · 608 Bytes

Known issues

getUser to getSin inference fails when literal is method and not property

Affected versions: 2.0.3-beta~

Tracking file getusergetsin.spec.ts

// fails
getUser(id: User | string): User | null {
    if (typeof id === `string`) {
    return myUsers[id] ?? null;
    }

    return id;
},
getSin(u) {
    // u is improperly typed
}
// works
getUser: (id: User | string): User | null => {
    if (typeof id === `string`) {
    return myUsers[id] ?? null;
    }

    return id;
},
getSin(u) {
    // u is properly typed
}

I don't know the root of this issue