Title: Suggestion: disallow implicit return of undefined · Issue #2316 · microsoft/TypeScript · GitHub
Open Graph Title: Suggestion: disallow implicit return of undefined · Issue #2316 · microsoft/TypeScript
X Title: Suggestion: disallow implicit return of undefined · Issue #2316 · microsoft/TypeScript
Description: It would be useful to be able to disallow an Explicitly Typed function/method from implicitly returning the value undefined. One example function that would be detected and disallowed was given by Roly Perera (@rolyp) in #2176. In that e...
Open Graph Description: It would be useful to be able to disallow an Explicitly Typed function/method from implicitly returning the value undefined. One example function that would be detected and disallowed was given by ...
X Description: It would be useful to be able to disallow an Explicitly Typed function/method from implicitly returning the value undefined. One example function that would be detected and disallowed was given by ...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/2316
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Suggestion: disallow implicit return of undefined","articleBody":"It would be useful to be able to disallow an Explicitly Typed function/method from implicitly returning the value undefined.\n\nOne example function that would be detected and disallowed was given by @rolyp in #2176. In that example, running off the end of the function causes undefined to be returned implicitly.\n\nAnother example that should be caught is:\n\n``` typescript\nfunction u(): number {\n return;\n}\n```\n\nA flag for enabling this option could be named --noImplictReturnUndefined.\n\nThis suggestion fits in with the meta-bug in #274 and maybe #2176.\n","author":{"url":"https://github.com/neilgalarneau","@type":"Person","name":"neilgalarneau"},"datePublished":"2015-03-12T13:41:31Z","url":"https://github.com/microsoft/TypeScript/issues/2316"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:acdd7a34-6afe-2339-2b5d-abd1bd716d76 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A546:157C65:3E4238:54597C:6B00C9F7 |
| html-safe-nonce | 8ab04495bcec87a2d0667912cb701898e48d3a97ea97db57d695c5c7df10ee2a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTQ2OjE1N0M2NTozRTQyMzg6NTQ1OTdDOjZCMDBDOUY3IiwidmlzaXRvcl9pZCI6Ijc0NzYzMTEwOTQwMzEwMTY4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 117eb4b7ba0a8cb9c1739f0ee7f2f60c987cb26a8a99101718a7fb3ee02f413b |
| hovercard-subject-tag | issue:60820034 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/2316/issue_layout |
| twitter:image | https://opengraph.githubassets.com/036cf9567b1098f351389fa44ea1cfe436a86b8248773d858c625e11a18b66b3/microsoft/TypeScript/issues/2316 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/036cf9567b1098f351389fa44ea1cfe436a86b8248773d858c625e11a18b66b3/microsoft/TypeScript/issues/2316 |
| og:image:alt | It would be useful to be able to disallow an Explicitly Typed function/method from implicitly returning the value undefined. One example function that would be detected and disallowed was given by ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | neilgalarneau |
| hostname | github.com |
| expected-hostname | github.com |
| None | 98dc00e171c204462a6f367482a0f8c3c6b5dbca99cd7390e82d2df49ce096e4 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ef013399cf0a3c324bea644a685d7c1e0f06b5b7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width