Skip to content

[require-returns] Add an option to require a returns-tag if TS type annotation is other than void/Promise<void> #517

@neurolag

Description

@neurolag

In typescript you have the option to specify the return-type of a function:

// Function
function test(): string { }
// Arrow-Function
let test = (): string => { };
// FunctionType
let test: () => string;

// Abstract method
class Test {
  abstract Test(): string;
}

Do you guys think its smart to add an option to also require a @returns-parameter if a return-type other than none, void or Promise<void> is specified?
Or do you think this would go too far?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions