ionide-vscode-fsharp icon indicating copy to clipboard operation
ionide-vscode-fsharp copied to clipboard

Feature: Quickfix - Add explicit type (inferred) signature to current method

Open kontomondo opened this issue 9 years ago • 4 comments

Not sure if this one is useful or not... It would allow one to add inferred types to the current in-scope function, eg.

let getWords text = 
    text.Split(' ') [Cursor Here]
let result = getWords "Hello World"

If the cursor is in the scope of the process function, invoking the quickfix action would lead to:

let getWords (text:string) : string[] = 
    text.Split(' ')
let result = getWords "Hello World"

Perhaps there could also be reverse of this -- delete all signature types.

kontomondo avatar Sep 28 '16 00:09 kontomondo

CC: @rikace

Krzysztof-Cieslak avatar May 24 '18 21:05 Krzysztof-Cieslak

@kontomondo I would like this feature as well. this could be very useful during code complete to generate a more readable and maintainable code. @Krzysztof-Cieslak I will look into it, I ll ping you with some questions soon

rikace avatar May 25 '18 01:05 rikace

Cross referencing the implementation repo this would be in: https://github.com/fsharp/FsAutoComplete/issues/333

7sharp9 avatar Oct 04 '19 14:10 7sharp9

Related StackOverflow question (and possible answer)

https://stackoverflow.com/questions/54446876/how-to-get-f-signature-visual-studio-or-vs-code

dharmaturtle avatar Jun 17 '20 13:06 dharmaturtle