Title: Unions without discriminant properties do not perform excess property checking · Issue #20863 · microsoft/TypeScript · GitHub
Open Graph Title: Unions without discriminant properties do not perform excess property checking · Issue #20863 · microsoft/TypeScript
X Title: Unions without discriminant properties do not perform excess property checking · Issue #20863 · microsoft/TypeScript
Description: TypeScript Version: 2.7.0-dev.201xxxxx Code // An object to hold all the possible options type AllOptions = { startDate: Date endDate: Date author: number } // Any combination of startDate, endDate can be used type DateOptions = | Pick Open Graph Description: TypeScript Version: 2.7.0-dev.201xxxxx Code // An object to hold all the possible options type AllOptions = { startDate: Date endDate: Date author: number } // Any combination of startDate, endDate...
X Description: TypeScript Version: 2.7.0-dev.201xxxxx Code // An object to hold all the possible options type AllOptions = { startDate: Date endDate: Date author: number } // Any combination of startDate, endDate...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/20863
X: @github
Domain: github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unions without discriminant properties do not perform excess property checking","articleBody":"\u003c!-- BUGS: Please use this template. -->\r\n\u003c!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript -->\r\n\u003c!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->\r\n\r\n\u003c!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:** 2.7.0-dev.201xxxxx\r\n\r\n**Code**\r\n\r\n```ts\r\n// An object to hold all the possible options\r\ntype AllOptions = {\r\n startDate: Date\r\n endDate: Date\r\n author: number\r\n}\r\n\r\n// Any combination of startDate, endDate can be used\r\ntype DateOptions =\r\n | Pick\u003cAllOptions, 'startDate'>\r\n | Pick\u003cAllOptions, 'endDate'>\r\n | Pick\u003cAllOptions, 'startDate' | 'endDate'>\r\n\r\ntype AuthorOptions = Pick\u003cAllOptions, 'author'>\r\n\r\ntype AllowedOptions = DateOptions | AuthorOptions\r\n\r\nconst options: AllowedOptions = {\r\n startDate: new Date(),\r\n author: 1\r\n}\r\n\r\n```\r\n\r\n**Expected behavior:**\r\n\r\nAn error that `options` cannot be coerced into type `AllowedOptions` because `startDate` and `author` cannot appear in the same object.\r\n\r\n**Actual behavior:**\r\n\r\nIt compiles fine.","author":{"url":"https://github.com/cazgp","@type":"Person","name":"cazgp"},"datePublished":"2017-12-22T13:37:59Z","url":"https://github.com/microsoft/TypeScript/issues/20863"}
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:e6cfaaad-043b-62b3-5c05-a7052e7540f2 current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id AA02:296654:28191DD:357CAF2:6B01B365 html-safe-nonce d2669743b088ecb49334a739b2fcd3ec058f4d97177098c320eb88eca2c48467 visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQTAyOjI5NjY1NDoyODE5MUREOjM1N0NBRjI6NkIwMUIzNjUiLCJ2aXNpdG9yX2lkIjoiNjM3NjE1NzEwNzY3NDI2NDQyMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 visitor-hmac 2af91828216e4a60b382c1f9e632313403b694d4455ca5e73da3d8aab4d2abd1 hovercard-subject-tag issue:284165409 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/20863/issue_layout twitter:image https://opengraph.githubassets.com/462c93be2bc19bb62bda6418ab6925eaaba129e8798156e6b9c1a5b83a9a24e0/microsoft/TypeScript/issues/20863 twitter:card summary_large_image og:image https://opengraph.githubassets.com/462c93be2bc19bb62bda6418ab6925eaaba129e8798156e6b9c1a5b83a9a24e0/microsoft/TypeScript/issues/20863 og:image:alt TypeScript Version: 2.7.0-dev.201xxxxx Code // An object to hold all the possible options type AllOptions = { startDate: Date endDate: Date author: number } // Any combination of startDate, endDate... og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username cazgp hostname github.com expected-hostname github.com None cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c 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 8c77c9e8439031ad54c75a250694842892f693e1 ui-target full theme-color #1e2327 color-scheme light dark react-app-name issues
URLs of crawlers that visited me.