-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
Fix AvailableA PR has been opened for this issueA PR has been opened for this issueMeta-IssueAn issue about the team, or the direction of TypeScriptAn issue about the team, or the direction of TypeScriptRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone
Milestone
Description
Categorizing breaks we've seen from this
type Comparable = string | undefined | Array<string>;
export function check<T extends Comparable>(a: T) {
if (Array.isArray(a)) {
// 4.0: m: string
// 4.1: Error, cannot index
const m = a[0];
}
}
const aggregatedResults: (number[] | null | 'loading')[] = [[1, 2], null, [3, 4], 'loading', [5, 6]]
// 4.0: onlyTheArrays: number[][]
// 4:1 Error, no overload matches this
const onlyTheArrays = aggregatedResults.filter<number[]>(Array.isArray) // number[][]
grantila, SlurpTheo and binjospookie
Metadata
Metadata
Assignees
Labels
Fix AvailableA PR has been opened for this issueA PR has been opened for this issueMeta-IssueAn issue about the team, or the direction of TypeScriptAn issue about the team, or the direction of TypeScriptRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone