Notes from Ryan Cavanaugh (@RyanCavanaugh)
import *
#41825
import()
@importType * as Foo from "bar"
@importType { destr } from "bar"
@import
from x import y
type
Set
#57230
s.intersect(t)
t.intersect(s)
sup.intersect(sub)
Set<sub>
Set<sup>
strs.intersect(nums)
I'll note that it's not really just generic vs. non-generic. It's more constrained vs. unconstrained.
Set<T>
intersect(x: Set<unknown>): Set<T>
intersect(x: Set<T>): Set<T>
intersect<U>(x: Set<U>): Set<T & U>
intersect<U extends T>(x: Set<U>): Set<T & U>
Activity
DanielRosenwasser commentedon Jan 31, 2024
I'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>Set<T>andintersect(x: Set<T>): Set<T>Set<T>andintersect<U>(x: Set<U>): Set<T & U>Set<T>andintersect<U extends T>(x: Set<U>): Set<T & U>