Skip to content

Add quick fix for return type mismatch: "Change return type of a function to the type inferred from the returned variable" #6303

@avkonst

Description

@avkonst

It is feature request. I find I need it very frequently when rapidly develop new code:

Here is the error I see:
image

And I would like to have a quick fix provided by VS code, which would add (or change to) correct return type annotation to the function automatically:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions