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

return-undefined: Treat a function returning void | undefined as returning void #2731

Merged
merged 2 commits into from
May 13, 2017

Conversation

andy-hanson
Copy link
Contributor

@andy-hanson andy-hanson commented May 11, 2017

PR checklist

  • Addresses an existing issue: #0000
  • New feature, bugfix, or enhancement
    • Includes tests
  • Documentation update

Overview of change:

This matters if you define a function of type <T>(callback: () => T | undefined) so that you can sometimes use it as void but sometimes use it to return a value.
Also enables return-undefined in the tslint repository.

CHANGELOG.md entry:

[rule-change]
[bugfix] return-undefined: Treat a return type void | undefined same as void

@nchen63 nchen63 merged commit 353ff31 into palantir:master May 13, 2017
@andy-hanson andy-hanson deleted the return-void-or-undefined branch May 13, 2017 04:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants