Title: Mapped types over keyof T should be subtypes of types with string index signatures · Issue #14548 · microsoft/TypeScript · GitHub
Open Graph Title: Mapped types over keyof T should be subtypes of types with string index signatures · Issue #14548 · microsoft/TypeScript
X Title: Mapped types over keyof T should be subtypes of types with string index signatures · Issue #14548 · microsoft/TypeScript
Description: TypeScript Version: 2.2.1 Code // helpers to map types type Dictionary = { [key: string]: string; }; interface IBaseEntity { name: string; properties: Dictionary; } interface IEntity
Open Graph Description: TypeScript Version: 2.2.1 Code // helpers to map types type Dictionary = { [key: string]: string; }; interface IBaseEntity { name: string; properties: Dictionary; } interface IEntity
X Description: TypeScript Version: 2.2.1 Code // helpers to map types type Dictionary = { [key: string]: string; }; interface IBaseEntity { name: string; properties: Dictionary; } interface IEntity<t> exten...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/14548
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Mapped types over keyof T should be subtypes of types with string index signatures","articleBody":"**TypeScript Version:** 2.2.1\r\n\r\n**Code**\r\n\r\n```ts\r\n// helpers to map types\r\ntype Dictionary = {\r\n [key: string]: string;\r\n};\r\n\r\ninterface IBaseEntity {\r\n name: string;\r\n properties: Dictionary;\r\n}\r\ninterface IEntity\u003ct> extends IBaseEntity {\r\n properties: Record\u003ct, string>;\r\n}\r\n```\r\n\r\n**Expected behaviour:**\r\nNo Compile error.\r\n\r\n**Actual behaviour:**\r\nCompile error: \r\n```\r\nInterface 'IEntity\u003ct>' incorrectly extends interface 'IBaseEntity'.\r\n Types of property 'properties' are incompatible.\r\n Type 'Record\u003ct, string>' is not assignable to type 'Dictionary'.\r\n```\r\n\r\nEdit: Replace StrictDictionary\u003ct> with Record\u003ct, string>. Show full compile error.\r\n\r\n","author":{"url":"https://github.com/cwmacdon","@type":"Person","name":"cwmacdon"},"datePublished":"2017-03-08T23:33:25Z","url":"https://github.com/microsoft/TypeScript/issues/14548"}
| 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:7c2d9b69-3348-1e55-5660-04a10082ce8c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DD98:27E5CD:DD8B5C:11E829E:6B00F7F3 |
| html-safe-nonce | 309a1b33652a7fd1cd95d8e7b20268d2508fd7f129fa1e17846ec78fa3b6e4a3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDk4OjI3RTVDRDpERDhCNUM6MTFFODI5RTo2QjAwRjdGMyIsInZpc2l0b3JfaWQiOiIyMDYwNjIxNzQxNTc0NjQ5ODQzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 622f1437b63ecb54cb4e01d2bfaffc302cacf20bc2733a0f54bac9578b15e9db |
| hovercard-subject-tag | issue:212889789 |
| 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/14548/issue_layout |
| twitter:image | https://opengraph.githubassets.com/59d7a80f495e885b31ab7aae8f0dd9ad6b20cab34cd80669109bae2dd4950952/microsoft/TypeScript/issues/14548 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/59d7a80f495e885b31ab7aae8f0dd9ad6b20cab34cd80669109bae2dd4950952/microsoft/TypeScript/issues/14548 |
| og:image:alt | TypeScript Version: 2.2.1 Code // helpers to map types type Dictionary = { [key: string]: string; }; interface IBaseEntity { name: string; properties: Dictionary; } interface IEntity |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cwmacdon |
| hostname | github.com |
| expected-hostname | github.com |
| None | e208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187 |
| 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 | 7dafd017fb7809a839c443dba08622af38e63c09 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width