You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2019/01/19 05:50:16 UTC
[GitHub] jgranick opened a new issue #385: (Question) Ability to write
typedef classes?
jgranick opened a new issue #385: (Question) Ability to write typedef classes?
URL: https://github.com/apache/royale-asjs/issues/385
Hello!
Sorry to write a question here as an issue, but is there a way using meta-data (like the @externs metadata) to have a typedef class in Royale?
We have the `openfl.*` package defined in OpenFL, but we also want code referencing `flash.*` classes to work as well. We can do separate trees in our SWC externs (and do currently), but this results in a compiler error when it says that `openfl.display.Sprite` cannot be converted to unrelated type `flash.display.Sprite`... we want them to be the same. I tried something like the following, but it did not compile properly because it said there was no runtime constant of the class:
```as3
package flash.display {
import openfl.display.Sprite;
public const Sprite:Class = openfl.display.Sprite;
}
```
Is there another way? Thanks!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services