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
boolean
isolated declarations, quick fix, type predicates
TS 5.5+
https://www.typescriptlang.org/play/?isolatedDeclarations=true#code/GYVwdgxgLglg9mABDAzgZSgJxmA5gCgDcBDAGxAFMAuRcAazDgHcwBKRAbwChFfFMKUEJiRQAngAcKcYIhLkKiALwrEAIhRYcuNVwC+XIA
function isString(value: unknown) { return typeof value === "string" }
Quick fix suggests 'boolean' return type annotation
Quick fix should suggest the inferred 'value is string` predicate annotation
No response
The text was updated successfully, but these errors were encountered:
cc @danvk
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
π Search Terms
isolated declarations, quick fix, type predicates
π Version & Regression Information
TS 5.5+
β― Playground Link
https://www.typescriptlang.org/play/?isolatedDeclarations=true#code/GYVwdgxgLglg9mABDAzgZSgJxmA5gCgDcBDAGxAFMAuRcAazDgHcwBKRAbwChFfFMKUEJiRQAngAcKcYIhLkKiALwrEAIhRYcuNVwC+XIA
π» Code
π Actual behavior
Quick fix suggests 'boolean' return type annotation
π Expected behavior
Quick fix should suggest the inferred 'value is string` predicate annotation
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: