Main.hx 309 B

12345678910111213141516
  1. class Test {
  2. static function main() {
  3. var struct:Struct = {url: 'www.example.com', method: 'GET'};
  4. var promise:Generic<Struct> = new Generic({url: struct, method: 'GET'});
  5. }
  6. }
  7. class Generic<T> {
  8. public function new(v:T) {}
  9. }
  10. typedef Struct = {
  11. url:String,
  12. method:String,
  13. }