-
Notifications
You must be signed in to change notification settings - Fork 9
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
riot cli in webstorm not compiling typescript with let or const #26
Comments
have you properly configured typescript http://riotjs.com/guide/compiler/#typescript? |
As far as I can tell. It is compiling fine for other es6/typescript
features except for when I put let or const.
…On Mon, Apr 17, 2017 at 4:18 PM, Gianluca Guarini ***@***.***> wrote:
have you properly configured typescript http://riotjs.com/guide/
compiler/#typescript?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#26 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AIEUTSVmHXz0pcpj4HDdePLqzF3orGukks5rw8kRgaJpZM4M_f7N>
.
|
have you tried compiling via terminal? Could you please post your code? |
I had tried the terminal before and it gave me the undefined. I swear I had
it down to just something like "let x = () => { let y = 1; }" and it was
returning undefined in the js file, and when I changed let to var, it
worked. But now it is all working, not sure if it was some weird cache
issue or what... But it would be nice if it returned an error instead of
undefined in the js file to help debug. It looks like what I put as a bug
isn't one, it was a bug in my code, I just wasn't getting any compile
errors except the undefined in the js file. Sorry for the false bug.
…On Mon, Apr 17, 2017 at 4:40 PM, Gianluca Guarini ***@***.***> wrote:
have you tried compiling via terminal? Could you please post your code?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#26 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AIEUTSo6vnTXfuFi8HDI6kV61TBs9FQRks5rw85PgaJpZM4M_f7N>
.
|
If the compiler does not fail and the error is in your runtime script this is not a bug. The compiler scope is to output vaild javascript without compromising your program logic. In your case the issue was in your code. Good luck |
OK, I found the issue, I thought I had a bug in my code, but it was something different. The following compiles fine in a ts file:
|
it should be fixed in riot-cli@3.0.1 thanks for reporting the issue |
Awesome, thank you! |
* dev: (21 commits) added: release notes fixes #34 5.1.0 updated: unit test and changelog Update CHANGELOG.md updated: refactor the code in order to export the API.cli function updated: remove the isSilent flag for the API export branch updated: dependencies and fixed #26 Wraps by try block and reject on error Partially restores to previous code Makes it silent always when opt.stdout is true Returns promises Avoids negative conditions Adds tests Handles stdin and stdout Adds new options: stdin, stdout Uncomment the line accidentally commented out in previous commit Updates tests Adds `prepare` task to npm scripts Fixes small lint error ...
I am using riot cli in webstorm(don't think that matters), and I have a riot tag like this ->
<students_info> <div class="page_container" style=""> test </div> <script type="typescript"> let x = 1; </script> </students_info>
riot doesn't show any compile errors, but returns a js file with the word 'undefined' in it. if I change it to var it works. Other things like arrow functions and other things for typescript work fine as long as no let or const.
The text was updated successfully, but these errors were encountered: