-
Notifications
You must be signed in to change notification settings - Fork 8
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
ES6 version? #11
Comments
I guess porting it to pure ES6 should be straightforward. Perhaps it could be enough to compile it for ES6 target to have type removed and make it es6 compatible. I will to do some experiments, do you use babel right? |
Excellent, thank you! Yes, I work with Babel. Let me know if I can be of help. |
A note to add: |
I just did a small experiment:
I have an issue with babel insisting on calling What TypeScript does is tricking that a tag is a class, but that seems not to be possible in babel. Any clue? Unfortunately I have almost no experience with babel (and my first impression is that's it's rather clumsy if compared with TS, but I might be wrong). |
Can you please upload experiment the experiment code so I can run it? |
On this repo, switch to the Anyway it's not working because there is an issue regarding how babel implement classes. Typescript implements classes as function objects, whose constructor is the function itself and methods are put in the Babel, as far as I've understood, use a more complex pattern, with specific methods for creating a class and adding methods to it (e.g. Unfortunately RiotTS relies on the function-pattern to do its work, so it won't work under babel. I will look more into babel class system, but I guess to handle babel's special case a fork will be needed. |
I really like this system of creating riot tags, but at my work place we are sticking to the Ecmascript standard, given that ES6 is so similar to TS, is there a possibility for this to support ES6 as well?
The text was updated successfully, but these errors were encountered: