Design Meeting Notes, 1/31/2024 #57254
Copy link
Copy link
Closed
Labels
Design NotesNotes from our design meetingsNotes from our design meetings
Description
Activity
- addedDesign NotesNotes from our design meetingsNotes from our design meetings
on Jan 31, 2024 DanielRosenwasser commented
on Jan 31, 2024 MemberAuthorMore actionsI'll note that it's not really just generic vs. non-generic. It's more constrained vs. unconstrained.
Set<T>andintersect(x: Set<unknown>): Set<T>- non-generic, unconstrainted, nobody wanted that
Set<T>andintersect(x: Set<T>): Set<T>- non-generic, constrainted, this seems safer, but is less flexible and doesn't gain any information
Set<T>andintersect<U>(x: Set<U>): Set<T & U>- generic, unconstrained, this is what most people wanted
Set<T>andintersect<U extends T>(x: Set<U>): Set<T & U>- generic, constrained, this is what I probably would have wanted
Metadata
Metadata
Assignees
Labels
Design NotesNotes from our design meetingsNotes from our design meetings
Notes from Ryan Cavanaugh (@RyanCavanaugh)
JSDoc
import *#41825
import()s over and over again@importType * as Foo from "bar"@importType { destr } from "bar"@importinstead? It's unambiguousfrom x import y?typemodifier seems unnecessary since it's implicitly in a type contextSetmethods#57230
s.intersect(t)matchest.intersect(s)sup.intersect(sub)producesSet<sub>instead ofSet<sup>(good)strs.intersect(nums)gets detected as an error