Kotlin / dukat

Converter of <any kind of declarations> to Kotlin external declarations
552 stars 44 forks source link

Investigate when we can treat union type in type param as a distributive operation #375

Open Schahen opened 4 years ago

Schahen commented 4 years ago

Generally speaking, union is not distributive to type params in that sense that we can not resolve Some<A | B | C> as Some<A> | Some<B> | Some<C> however we can do it for Promises. Practically this:

function ping(a: Promise<A>)
function ping(a: Promise<B>)

are equivalent. This, of course, need to be thoroughly investigated.