Title: Regression: Partial properties became undefined instead of optional · Issue #37324 · microsoft/TypeScript · GitHub
Open Graph Title: Regression: Partial properties became undefined instead of optional · Issue #37324 · microsoft/TypeScript
X Title: Regression: Partial properties became undefined instead of optional · Issue #37324 · microsoft/TypeScript
Description: TypeScript Version: 3.9.0-dev.20200310 Search Terms: Partial Code export interface Messages { [key: string]: string $: string } export type PartialMessages Open Graph Description: TypeScript Version: 3.9.0-dev.20200310 Search Terms: Partial Code export interface Messages { [key: string]: string $: string } export type PartialMessages X Description: TypeScript Version: 3.9.0-dev.20200310 Search Terms: Partial Code export interface Messages { [key: string]: string $: string } export type PartialMessages<T extends Messages> = Partial<T&...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/37324
X: @github
Domain: github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Regression: Partial properties became undefined instead of optional","articleBody":"**TypeScript Version:** 3.9.0-dev.20200310\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:**\r\nPartial\r\n\r\n**Code**\r\n\r\n```ts\r\nexport interface Messages {\r\n [key: string]: string\r\n $: string\r\n}\r\nexport type PartialMessages\u003cT extends Messages> = Partial\u003cT> & {\r\n $: string\r\n}\r\nexport function createMessages\u003cT extends Messages>(messages: T): T {\r\n return messages\r\n}\r\nexport const en = createMessages({\r\n $: 'English',\r\n welcome: 'Welcome!',\r\n}\r\nexport const fr_ca = createMessages\u003cPartialMessages\u003ctypeof en>>({\r\n $: 'Français (Canada)',\r\n})\r\n```\r\n\r\n**Expected behavior:**\r\n\r\nShould compile. Messages in `PartialMessages` are either complying or absent.\r\n\r\n- last tested working version: Typescript 3.7.5\r\n- first tested failing version: Typescript 3.8.2\r\n\r\n**Actual behavior:**\r\n\r\nFail in:\r\n\r\n```ts\r\nexport const fr_ca = createMessages\u003cPartialMessages\u003ctypeof en>>(\r\n```\r\n\r\nConsider that all messages are present, but may be `undefined`.\r\n\r\n Type 'PartialMessages\u003c{ $: string; welcome: string; }>' does not satisfy the constraint 'Messages'.\r\n Property 'welcome' is incompatible with index signature.\r\n Type 'string | undefined' is not assignable to type 'Message'.\r\n Type 'undefined' is not assignable to type 'Message'.\r\n","author":{"url":"https://github.com/sveyret","@type":"Person","name":"sveyret"},"datePublished":"2020-03-10T15:43:34Z","url":"https://github.com/microsoft/TypeScript/issues/37324"}
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:08e8be73-2a2b-ca24-a38e-c7d0358fed22 current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id B06E:3A8E64:8032D8:A9FCA9:6B01AE8B html-safe-nonce 887d4804be16f3b13ef8f2116290a486df04a3a2c2e3374ad152ea84eb758af0 visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDZFOjNBOEU2NDo4MDMyRDg6QTlGQ0E5OjZCMDFBRThCIiwidmlzaXRvcl9pZCI6Ijc5NzEzNTgzOTcyMDk2MjAxMDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== visitor-hmac b09dd6ba6d7c1c8ed67eb8e722be58b246084b9196b6fddd6689a062d349f6f5 hovercard-subject-tag issue:578676518 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/37324/issue_layout twitter:image https://opengraph.githubassets.com/ce2522d89aada69df16c01ac705edba0cf6ef2655479713c8cbdac5c061fcafe/microsoft/TypeScript/issues/37324 twitter:card summary_large_image og:image https://opengraph.githubassets.com/ce2522d89aada69df16c01ac705edba0cf6ef2655479713c8cbdac5c061fcafe/microsoft/TypeScript/issues/37324 og:image:alt TypeScript Version: 3.9.0-dev.20200310 Search Terms: Partial Code export interface Messages { [key: string]: string $: string } export type PartialMessages og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username sveyret 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.