-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
Found by playing around with @mattmccutchen's example at #26013 (comment):
interface CoolArray<E> extends Array<E> {
hello: number;
}
declare function foo<T extends any[]>(cb: (...args: T) => void): void;
foo<CoolArray<any>>(); // error
foo<CoolArray<any>>(100); // error
foo<CoolArray<any>>(foo); // no error!!Expected: All of these calls produce an error and have a good error message.
Actual: The first two have bad errors, the last one is considered okay.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue