Closed mhevery closed 8 years ago
We translate these as casts as they are casts in TS. Is there anything in particular this breaks?
You could also try:
let x: string[] = [];
@mprobst Yes, it is a cast, but what I am trying to request is that when we are doing a cast in front of a type literals, then it is not treated as cast, but as reified type. So the current behavior is correct, but we would like to augment it.
BTW, in dart: List<String> x = []
and var x = <String>[]
are not the same as one is reified and the other is not. (@vsmenon am I correct?)
Ah I see, the issue is that you need the type reification inside the container. I'll TAL.
Fixed, released in v0.7.33 and v0.8.9.
Love it, thanks
Given:
We get:
We want to get: