I'm using typescript side by Javascript... on Webstorm, and IntelliJ depend on the cases, and i found that it returns error, maybe it's due to one of these reasons lack of their implementation, or maybe i need to know something i do not know about JS Doc, or maybe it's lack of JsDoc for such cases....
the code i use in my TS:
type X='a'|'b'|'c';
and somewhere in my js, i say,
/**
* @param z {X}
*/
function f(z){
if(z =='a')
....
}
and when i go over the equality signs, it show a message:
"Assigned expression type string is not assignable to type IterationOption, which IterationOption is my X in above case
Anyway, the IDE does not understand that i use type, and it doesn't understand it if i put Js Doc '@type' on it's head even if i do that.
Please Refer to These Links, as I Followed Them Myself:
http://stackoverflow.com/questions/15490560/create-an-enum-with-string-values-in-typescript
https://basarat.gitbooks.io/typescript/content/docs/types/literal-types.html
YouTrack Link:
https://youtrack.jetbrains.com/issue/IDEA-166433
I'm using typescript side by Javascript... on Webstorm, and IntelliJ depend on the cases, and i found that it returns error, maybe it's due to one of these reasons lack of their implementation, or maybe i need to know something i do not know about JS Doc, or maybe it's lack of JsDoc for such cases....
the code i use in my TS:
type X='a'|'b'|'c';and somewhere in my js, i say,
and when i go over the equality signs, it show a message:
"Assigned expression type string is not assignable to type IterationOption, which IterationOption is my X in above case
Anyway, the IDE does not understand that i use
type, and it doesn't understand it if i put Js Doc '@type' on it's head even if i do that.Please Refer to These Links, as I Followed Them Myself:
http://stackoverflow.com/questions/15490560/create-an-enum-with-string-values-in-typescript
https://basarat.gitbooks.io/typescript/content/docs/types/literal-types.html
YouTrack Link:
https://youtrack.jetbrains.com/issue/IDEA-166433