Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

return-undefined false positive with async function #3234

Closed
nicolashenry opened this issue Sep 18, 2017 · 0 comments · Fixed by #3298
Closed

return-undefined false positive with async function #3234

nicolashenry opened this issue Sep 18, 2017 · 0 comments · Fixed by #3298

Comments

@nicolashenry
Copy link

Bug Report

  • TSLint version: 5.7.0
  • TypeScript version: 2.5.2
  • Running TSLint via: CLI / VSCode

TypeScript code being linted

declare function test(cb: () => Promise<void> | void): void;

test(async () => {
	return;
});

with tslint.json configuration:

{
  "defaultSeverity": "warning",
  "rules": {
    "return-undefined": true
  }
}

Actual behavior

[tslint] Value-returning function should use `return undefined;`, not just `return;`. (return-undefined)

Expected behavior

No error

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant