The type checker hardcodes conversions from Array<T>
to Array<U>
if there is a conversion from T
to U
. Similar rules exist for Optional
and Dictionary
. There's no mechanism for doing this with your own types.
12 Likes