-
-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add @:message.follow #11448
Add @:message.follow #11448
Conversation
Now I wonder if this is too narrow. How would people feel about something more generic that allows e.g. this: @:message.message("$T1 | $T2")
abstract EitherType<T1, T2>(Dynamic) from T1 to T1 from T2 to T2 {} Just a custom string with some predefined $-replacements. |
Couldn't both exist? Then adding (not sure how useful @:message.message could be..) |
Well, I picked |
Seems to be cutting very close to the proposed Also, What's desired in both cases is user defined type formatting. |
Is this possible to think about some meta to allow writing of |
Ah right, I knew we discussed this somewhere before. I guess I don't want to add random shorthands for |
Agreed. I would even say it should not, because For starters "either" implies a disjunctive union. And if we only consider disjunct types (which is how FWIW I'd go with
Since adding unions is most likely a breaking change, I think now is the moment to reconsider it. At least for externs it would be very practical (dts2hx could make good use of it), and it could be restricted to that, not unlike |
Closing this because it's a weird middle-ground solution. |
I sometimes have some sort of helper typedefs that I don't actually want users to see in error messages and such. With this metadata, typedefs are followed away in the internal printing: