You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 31, 2021. It is now read-only.
There should be an easy way to add type annotations to function parameters or remove them, as this operation currently requires a sequence of fiddly and largely mechanical navigation and typing actions.
Expected behavior
When the caret is on a function parameter, detect whether the symbol currently has a type annotation.
If it doesn't, show a light bulb suggestion to allow adding the type annotation - parentheses, colon and a type placeholder. If the compiler can determine the type of the symbol, it should be used for the annotation. Ideally, that should also correctly determine generic type variables used elsewhere in the function signature or scope (for nested functions).
If the symbol currently has a type annotation, show a light bulb suggestion to remove the annotation. This is primarily to reduce the mechanical work; if that causes the code to not compile, that is the user's responsibility.
The text was updated successfully, but these errors were encountered:
We would like to implement this feature request as part of FSSF mentorship program. This seems like useful yet small enough feature to work on. Further discussion is welcome.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
There should be an easy way to add type annotations to function parameters or remove them, as this operation currently requires a sequence of fiddly and largely mechanical navigation and typing actions.
Expected behavior
When the caret is on a function parameter, detect whether the symbol currently has a type annotation.
If it doesn't, show a light bulb suggestion to allow adding the type annotation - parentheses, colon and a type placeholder. If the compiler can determine the type of the symbol, it should be used for the annotation. Ideally, that should also correctly determine generic type variables used elsewhere in the function signature or scope (for nested functions).
If the symbol currently has a type annotation, show a light bulb suggestion to remove the annotation. This is primarily to reduce the mechanical work; if that causes the code to not compile, that is the user's responsibility.
The text was updated successfully, but these errors were encountered: