Skip to content

Quickfix for functions missing return statement #13589

Closed
@Chris2011

Description

@Chris2011

TypeScript Version: 2.0.3

Code

I have this piece of code where I see the error of missing return type. Correct behaviour

    public getListData(path: string): Object {

    }

I use NetBeans with the NBTS Plugin: https://github.com/Everlaw/nbts.
I created a ticket there: Everlaw/nbts#85 which I want to have fixes for warnings/errors. I have a method with Object as a return type. The method body is empty. It throws an error that I need a return type.

Expected behavior:

I want to have fixes for the error that I can add the return type or change the method return type to void as you can see it here, which is working for Java:

return-value-java

Actual behavior:

I only see the error:

return-value

Regards

Chris

Metadata

Metadata

Assignees

No one assigned

    Labels

    DeclinedThe issue was declined as something which matches the TypeScript visionDomain: Quick FixesEditor-provided fixes, often called code actions.SuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions