You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to haxe...@googlegroups.com
Hi, all:
If I have a class, e.g.
class User {
var name:String,
public function hello() {}
}
Is it possible to create a "typedef" which takes "User" as example, during compilation period (with macro)? The "typedef" looks like:
{
name:String,
hello: Void -> Void
}
Juraj Kirchheim
unread,
Jan 21, 2013, 3:28:12 AM1/21/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to haxe...@googlegroups.com
In fact the anonymous type you provided will not take User, because for User, hello doesn't allow write access.
But yes, in general there's a number of ways to do this. In your case (assuming that you want this for your angular.js stuff) you can simply get all instance fields and the type you want is TAnonymous(instanceFields).