complete/no-undefined-return-type
💼 This rule is enabled in the ✅ recommended config.
📝 Disallows undefined return types on functions.
💭 This rule requires type information.
Rule Details
Section titled “Rule Details”A function that only returns undefined is confusing and likely to be a
mistake, since a function that returns nothing should have a return type of
void.
// Badfunction foo(): undefined { return;}
// Goodfunction foo(): void { return;}
// Badfunction foo() { return undefined;}
// Goodfunction foo() { return;}Options
Section titled “Options”This rule is not configurable.
