We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Input:
function foo(str: string) {} foo(<string>JSON.parse('"foo"'));
Outputs:
// @param {string} str function foo(str) { } foo(JSON.parse('"foo"'));
We drop the <string> so Closure doesn't know about the type cast, producing a warning.
<string>
The text was updated successfully, but these errors were encountered:
Due to microsoft/TypeScript#6982 , I can't find any way to make TS preserve an inline Closure type coercion.
Start from this: http://www.typescriptlang.org/Playground#src=let%20x%20%3D%20%2F**%20foo%20*%2F(3)%3B and see if you can find some combination of parens etc. to make it work... hmm.
Sorry, something went wrong.
@martine maybe we could contribute an upstream patch?
Evan Martin [email protected] schrieb am Do., 18. Feb. 2016 um 00:27 Uhr:
Due to microsoft/TypeScript#6982 microsoft/TypeScript#6982 , I can't find any way to make TS preserve an inline Closure type coercion. Start from this: http://www.typescriptlang.org/Playground#src=let%20x%20%3D%20%2F**%20foo%20*%2F(3)%3B and see if you can find some combination of parens etc. to make it work... hmm. — Reply to this email directly or view it on GitHub #65 (comment).
Due to microsoft/TypeScript#6982 microsoft/TypeScript#6982 , I can't find any way to make TS preserve an inline Closure type coercion.
Start from this:
http://www.typescriptlang.org/Playground#src=let%20x%20%3D%20%2F**%20foo%20*%2F(3)%3B and see if you can find some combination of parens etc. to make it work... hmm.
— Reply to this email directly or view it on GitHub #65 (comment).
convert TypeScript type coercions to Closure ones
327094a
Fixes #65.
No branches or pull requests
Input:
Outputs:
We drop the
<string>
so Closure doesn't know about the type cast, producing a warning.The text was updated successfully, but these errors were encountered: