-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
DuplicateAn existing issue was already createdAn existing issue was already createdFixedA PR has been merged for this issueA PR has been merged for this issue
Description
TS 2.0.3
See the comments and last line in the code below for expected/actual.
{
type Foo = { foo: true };
const isFoo = (foo: Foo) => foo.foo;
const xs = [{ foo: true }, undefined];
isFoo(xs[1]) // good, errors
const x = undefined as Foo | undefined;
isFoo(x) // good, errors
xs.filter(isFoo) // bad, didn't fail, expected filter arg to fail, should be Foo | undefined
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
DuplicateAn existing issue was already createdAn existing issue was already createdFixedA PR has been merged for this issueA PR has been merged for this issue