You do not have permission to delete messages in this group
Copy link
Report message
Sign in to 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
Hello,
We have (and to keep) a structure using a typedef in a way that fields can be mandatory.
However in some cases we want to use a typedef with the same fields all optional as a function argument.
We can define the argument using a wrapper type like instance as OptionalFields<MyTypedef>.
Any suggestion?
Philippe
Dan Korostelev
unread,
Jan 12, 2017, 1:18:12 PM1/12/17
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
Sign in to 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
Should be easily doable with a @:genericBuild macro.
четверг, 12 января 2017 г., 21:11:25 UTC+3 пользователь Philippe Elsass написал:
Haxiomic
unread,
Jan 15, 2017, 5:19:20 PM1/15/17
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
Sign in to 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
This is quite a common situation, Typescript has made its 'Partial<T>' type part of the typescript standard library. As Dan said, @:genericBuild is the way, If anyone needs one, here's an implementation in haxe
Philippe Elsass
unread,
Jan 16, 2017, 3:23:14 PM1/16/17
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
Sign in to 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