Title: type never inference fails short with continuation passing style · Issue #8728 · microsoft/TypeScript · GitHub
Open Graph Title: type never inference fails short with continuation passing style · Issue #8728 · microsoft/TypeScript
X Title: type never inference fails short with continuation passing style · Issue #8728 · microsoft/TypeScript
Description: nightly build function fail(message: string) : never { throw new Error(message); } function withFew(values: a[], haveFew: (values: a[]) => r, haveNone: (reason: string) => r): r { return values.length > 0 ? haveFew(values) : haveNo...
Open Graph Description: nightly build function fail(message: string) : never { throw new Error(message); } function withFew(values: a[], haveFew: (values: a[]) => r, haveNone: (reason: string) => r): r { return valu...
X Description: nightly build function fail(message: string) : never { throw new Error(message); } function withFew<a, r>(values: a[], haveFew: (values: a[]) => r, haveNone: (reason: string) => r): r {...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/8728
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"type never inference fails short with continuation passing style","articleBody":"nightly build\n\n``` typescript\nfunction fail(message: string) : never { throw new Error(message); }\nfunction withFew\u003ca, r>(values: a[], haveFew: (values: a[]) => r, haveNone: (reason: string) => r): r {\n return values.length > 0 ? haveFew(values) : haveNone('No values.');\n}\nfunction id\u003ca>(value: a) : a { return value; }\nconst result = withFew([1, 2, 3], id, fail); // expected result of number[], actual inference problem\n```\n\n\n","author":{"url":"https://github.com/zpdDG4gta8XKpMCd","@type":"Person","name":"zpdDG4gta8XKpMCd"},"datePublished":"2016-05-21T16:25:41Z","url":"https://github.com/microsoft/TypeScript/issues/8728"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| 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:d80b96cd-8bb7-8d7f-18d4-592f9f5c94f9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A178:29C55F:132E858:1A30D22:6AFB706F |
| html-safe-nonce | 728cca8887b591288ecfd711e3cd2095b744e350afa1d56f434f682c0ab5dc65 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMTc4OjI5QzU1RjoxMzJFODU4OjFBMzBEMjI6NkFGQjcwNkYiLCJ2aXNpdG9yX2lkIjoiMTU3NTM5NTM5NzUzNzA2NzExOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0e231b689cf1d32c4b89a7652b0df8153a76e95bb7b84c2b974a9a44ebde2270 |
| hovercard-subject-tag | issue:156109951 |
| 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/8728/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b438aeb4fcff383f8dd63e047981c937925af08969d4d6ce119195e5809126ec/microsoft/TypeScript/issues/8728 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b438aeb4fcff383f8dd63e047981c937925af08969d4d6ce119195e5809126ec/microsoft/TypeScript/issues/8728 |
| og:image:alt | nightly build function fail(message: string) : never { throw new Error(message); } function withFew(values: a[], haveFew: (values: a[]) => r, haveNone: (reason: string) => r): r { return valu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | zpdDG4gta8XKpMCd |
| hostname | github.com |
| expected-hostname | github.com |
| None | cca289ecd54650fcf3c0b037a58b97186dee2cc4406819d87fab93728fd83700 |
| 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 | 88808b1fae5ab8a526a73e7ce5542a10eb9d6971 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width