Ryan Cavanaugh
Ryan Cavanaugh
There are other ways to do it, but that's probably the best one.
Workaround ```ts type Broken = { readonly [P in keyof V]: V[P] extends (infer T extends Foo) ? Nothing : never; }; ```
We shouldn't even let you write `declare let foo: (...args: never) => void;`. It doesn't make sense. The second assignment isn't unsound per our definition of rest args being assumed...
Upon further reflection, I think you're right about `(args: never)`
:+1: Bracketed property access should work the same as dotted property access for the purposes of type guards when the indexed name matches a known property
Looking for concrete examples of where this comes up more legitimately
@husnain129 not a correct assumption, `Auth("admin", "hello")` is a legal call
Typo, should be ```ts Auth("admin", { name: "" }); ```
Tagging this help wanted but we'd like to wait until this is shipping in Chrome/Edge before getting a PR for it
Please provide necessary code as text when it appears in a screenshot