evestera / json_typegen

Tools and libraries to create types for Rust, Kotlin, TypeScript and Python from JSON samples
https://typegen.vestera.as
Apache License 2.0
268 stars 26 forks source link

Type parameter hints #27

Open evestera opened 3 years ago

evestera commented 3 years ago

E.g.

{
  "/hits/hits/-/_source": {
    "type_parameter": "T"
  }
}

or

{
  "/hits/hits/-/_source": {
    "use_type": "type_parameter"
  }
}

For typescript/typealias this is already possible with just adding <T> to the type name and using

{
  "/hits/hits/-/_source": {
    "use_type": "T"
  }
}