haxetink / tink_macro

The macro toolkit
MIT License
57 stars 17 forks source link

Add helper to allow using ComplexType with type parameter as value #31

Open kevinresol opened 4 years ago

kevinresol commented 4 years ago

Basically this piece of code: https://github.com/haxetink/tink_json/blob/09c708c6cebfa47fd9165d9b6a380e077ff3f320/src/tink/json/macros/GenWriter.hx#L368-L379

For example for tink.Annex we have .get(TheType), but .get(TheType<Int>) doesn't work, but we can typedef TheIntType = TheType<Int>; then .get(TheIntType). This will be useful if TheType is generically built and produces distinct types at runtime.