Skip to content
New issue

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

Suggestion: Add argument anotation #544

Open
vincentremond opened this issue Jul 5, 2023 · 1 comment
Open

Suggestion: Add argument anotation #544

vincentremond opened this issue Jul 5, 2023 · 1 comment

Comments

@vincentremond
Copy link

vincentremond commented Jul 5, 2023

I use Rider a lot for F# development and there is a feature that I would love to have: Add type anotation for arguments.

For example, if I have the following function:

module Regex =
    let replace pattern replacement input =
        System.Text.RegularExpressions.Regex.Replace(input, pattern, replacement)

it won't compile because the compiler doesn't know which overload to choose based on the type of the arguments. I have to add the type anotation manually to at least one of the arguments:

module Regex =
    let replace pattern (replacement: string) input =
        System.Text.RegularExpressions.Regex.Replace(input, pattern, replacement)

And I don't necessarily want to add the type anotation for all arguments, just the ones that are missing.

So I would love to have a feature that would allow me to add the type anotation for a single argument, currently we can only add the type anotation for all arguments and to the function return type :

2023-07-05_17h43_38

@auduchinok
Copy link
Collaborator

@vincentremond Thank you for writing about it! I agree, it would be much better to do have option to annotate things separately. There're some issues that we need to solve to enable it, but once solved, it would be possible and great to have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants