Use a function declaration vs a function expression to help deal with a reported Atom+IO.js issue.#2522
Conversation
… a reported Atom+IO.js issue.
|
View this change with |
|
closes #2503 |
|
The change looks fine. i am not sure i understand the original issue though :). so which visit was undefined? and how is that fixed? |
|
@mhegazy I don't understand the original reason either. But here it is mentioned again (#2505 (comment)) I am calling It works fine for most projects including TypeScript : However for atom-typescript itself, and specifically this source file : https://github.com/TypeStrong/atom-typescript/blob/master/lib/typings/mixto/mixto.d.ts It gives the error as shown: Fixes that work:
Note : I don't see why this error happens: The error is "use strict"
foo = 123Using |
|
Thanks for the explanation. it is just concerning that this is happening, and i want to make sure we do not have other places where similar behavior could occur. |
|
Yeah, can we actually link to the bug in io.js and/or Atom? Or has that not been filed? |
|
@basarat Can you tell me how to repro this issue locally? Without known root cause it looks like a magic and I don't like magic |
|
@vladima agreed. Open atom-typescript with atom-typescript. Have a typescript file active in the editor. Press "ctrl+shift+r" to trigger project symbols resolution. This error will occur and get logged into the atom console as a rejected promise. Tips:
|
|
Open typescript (i.e Microsoft/typescript) in atom. Have a TS file active. And press ctrl+shift+r and this error will not happen. |
|
A quick google search Does show previous bugs along similar lines: |
|
Interesting, I can repro the problem on my windows box, however everything works like charm on Linux. Let me check if I can fish out anything interesting |
Use a function declaration vs a function expression to help deal with a reported Atom+IO.js issue.
|
@basarat If you don't mind me asking, what tool do you use to create those gifs like the one in #2522 (comment)? Sorry for posting here, wasn't sure how else to ask. Feel free to delete this message. |




No description provided.