René's URL Explorer Experiment


Title: Index signature is assignable to weak type whose properties don't match the signature type · Issue #27144 · microsoft/TypeScript · GitHub

Open Graph Title: Index signature is assignable to weak type whose properties don't match the signature type · Issue #27144 · microsoft/TypeScript

X Title: Index signature is assignable to weak type whose properties don't match the signature type · Issue #27144 · microsoft/TypeScript

Description: From https://stackoverflow.com/q/52368008 . Based on #16047 (comment), it appears that Nathan Shively-Sanders (@sandersn) may have thought about the rule, but it still makes no sense to me and no rationale is stated. TypeScript Version: ...

Open Graph Description: From https://stackoverflow.com/q/52368008 . Based on #16047 (comment), it appears that Nathan Shively-Sanders (@sandersn) may have thought about the rule, but it still makes no sense to me and no r...

X Description: From https://stackoverflow.com/q/52368008 . Based on #16047 (comment), it appears that Nathan Shively-Sanders (@sandersn) may have thought about the rule, but it still makes no sense to me and no r...

Opengraph URL: https://github.com/microsoft/TypeScript/issues/27144

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Index signature is assignable to weak type whose properties don't match the signature type","articleBody":"\u003c!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨\r\n\r\nHalf of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common \"Bugs\" That Aren't Bugs section!\r\n\r\nPlease help us by doing the following steps before logging an issue:\r\n  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues\r\n  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ\r\n\r\nPlease fill in the *entire* template below.\r\n-->\r\n\r\nFrom https://stackoverflow.com/q/52368008 .  Based on https://github.com/Microsoft/TypeScript/pull/16047#issue-122101801, it appears that @sandersn may have thought about the rule, but it still makes no sense to me and no rationale is stated.\r\n\r\n\u003c!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:**  master (394ee31a56c40033f31a3a8461ec267463033194)\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:** weak type index signature \r\n\r\n**Code**\r\n```ts\r\ninterface Foo {\r\n    a?: string;\r\n}\r\ninterface Bar {\r\n    [n: string]: number;\r\n}\r\ndeclare let b: Bar;\r\n// No error; expected \"Type 'Bar' has no properties in common with type 'Foo'.\"\r\nlet a: Foo = b;\r\n```\r\n\r\n**Expected behavior:** Error: \"Type 'Bar' has no properties in common with type 'Foo'.\"\r\n\r\n**Actual behavior:** No error.\r\n\r\n**Playground Link:** [link](https://www.typescriptlang.org/play/#src=interface%20Foo%20%7B%0D%0A%20%20%20%20a%3F%3A%20string%3B%0D%0A%7D%0D%0Ainterface%20Bar%20%7B%0D%0A%20%20%20%20%5Bn%3A%20string%5D%3A%20number%3B%0D%0A%7D%0D%0Adeclare%20let%20b%3A%20Bar%3B%0D%0A%2F%2F%20No%20error%3B%20expected%20%22Type%20'Bar'%20has%20no%20properties%20in%20common%20with%20type%20'Foo'.%22%0D%0Alet%20a%3A%20Foo%20%3D%20b%3B%0D%0A)\r\n\r\n**Related Issues:** Possibly #9900\r\n","author":{"url":"https://github.com/mattmccutchen","@type":"Person","name":"mattmccutchen"},"datePublished":"2018-09-17T14:47:00Z","url":"https://github.com/microsoft/TypeScript/issues/27144"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1862e79b-7d23-f811-ca89-6f56ac229cc9
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC9D6:33444D:BE00BD:FDFDD2:6B00F74B
html-safe-nonce0882e7a5a933f8650dcac007f875c907e931c66366166588dc88b2023c0d494e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUQ2OjMzNDQ0RDpCRTAwQkQ6RkRGREQyOjZCMDBGNzRCIiwidmlzaXRvcl9pZCI6IjI0NzU0NzAzMjYyOTc4NTE3MjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac0bb2d7e30a1a962d7ff91f8abe14f5ae127cbba8880fc5b7a281dc49d53f14ca
hovercard-subject-tagissue:360904517
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/27144/issue_layout
twitter:imagehttps://opengraph.githubassets.com/899f1b3c80db5753c838ed96eac0b6d7245ba492469095687c1ee11ca0f4a855/microsoft/TypeScript/issues/27144
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/899f1b3c80db5753c838ed96eac0b6d7245ba492469095687c1ee11ca0f4a855/microsoft/TypeScript/issues/27144
og:image:altFrom https://stackoverflow.com/q/52368008 . Based on #16047 (comment), it appears that Nathan Shively-Sanders (@sandersn) may have thought about the rule, but it still makes no sense to me and no r...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemattmccutchen
hostnamegithub.com
expected-hostnamegithub.com
None4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc
turbo-cache-controlno-preview
go-importgithub.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id20929025
octolytics-dimension-repository_nwomicrosoft/TypeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20929025
octolytics-dimension-repository_network_root_nwomicrosoft/TypeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9983dd5da06943f833c971dd5b6bc988e2858be5
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/27144#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F27144
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F27144
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/27144
Reloadhttps://github.com/microsoft/TypeScript/issues/27144
Reloadhttps://github.com/microsoft/TypeScript/issues/27144
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests309 (309)https://github.com/microsoft/TypeScript/pulls
Actionshttps://github.com/microsoft/TypeScript/actions
Projectshttps://github.com/microsoft/TypeScript/projects
Wikihttps://github.com/microsoft/TypeScript/wiki
Security and qualityhttps://github.com/microsoft/TypeScript/security
Insightshttps://github.com/microsoft/TypeScript/insights
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/27144
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/27144
Index signature is assignable to weak type whose properties don't match the signature typehttps://github.com/microsoft/TypeScript/issues/27144#top
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Domain: Index TypesIssues with `keyof`https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20Index%20Types%22
Backloghttps://github.com/microsoft/TypeScript/milestone/29
https://github.com/mattmccutchen
Matt McCutchen (mattmccutchen)https://github.com/mattmccutchen
on Sep 17, 2018https://github.com/microsoft/TypeScript/issues/27144#issue-360904517
https://stackoverflow.com/q/52368008https://stackoverflow.com/q/52368008
#16047 (comment)https://github.com/microsoft/TypeScript/pull/16047#issue-122101801
Nathan Shively-Sanders (@sandersn)https://github.com/sandersn
394ee31https://github.com/microsoft/TypeScript/commit/394ee31a56c40033f31a3a8461ec267463033194
linkhttps://www.typescriptlang.org/play/#src=interface%20Foo%20%7B%0D%0A%20%20%20%20a%3F%3A%20string%3B%0D%0A%7D%0D%0Ainterface%20Bar%20%7B%0D%0A%20%20%20%20%5Bn%3A%20string%5D%3A%20number%3B%0D%0A%7D%0D%0Adeclare%20let%20b%3A%20Bar%3B%0D%0A%2F%2F%20No%20error%3B%20expected%20%22Type%20'Bar'%20has%20no%20properties%20in%20common%20with%20type%20'Foo'.%22%0D%0Alet%20a%3A%20Foo%20%3D%20b%3B%0D%0A
#9900https://github.com/microsoft/TypeScript/issues/9900
https://github.com/sandersn
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
on Sep 17, 2018https://github.com/microsoft/TypeScript/issues/27144#issuecomment-422060007
https://github.com/mattmccutchen
Matt McCutchen (mattmccutchen)https://github.com/mattmccutchen
on Sep 17, 2018https://github.com/microsoft/TypeScript/issues/27144#issuecomment-422064942
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
In DiscussionNot yet reached consensushttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22In%20Discussion%22
on Sep 17, 2018https://github.com/microsoft/TypeScript/issues/27144#event-1850107843
https://github.com/sandersn
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
on Sep 17, 2018https://github.com/microsoft/TypeScript/issues/27144#issuecomment-422066180
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
on Sep 17, 2018https://github.com/microsoft/TypeScript/issues/27144#event-1850109100
https://github.com/sandersn
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
on Sep 17, 2018https://github.com/microsoft/TypeScript/issues/27144#issuecomment-422074921
Daniel Rosenwasser (@DanielRosenwasser)https://github.com/DanielRosenwasser
https://github.com/mattmccutchen
Matt McCutchen (mattmccutchen)https://github.com/mattmccutchen
on Sep 17, 2018https://github.com/microsoft/TypeScript/issues/27144#issuecomment-422096302
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
In DiscussionNot yet reached consensushttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22In%20Discussion%22
on Sep 17, 2018https://github.com/microsoft/TypeScript/issues/27144#event-1850701040
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
Futurehttps://github.com/microsoft/TypeScript/milestone/29
on Sep 17, 2018https://github.com/microsoft/TypeScript/issues/27144#event-1850701225
https://github.com/sandersn
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
on Sep 17, 2018https://github.com/microsoft/TypeScript/issues/27144#issuecomment-422151486
Matt McCutchen (@mattmccutchen)https://github.com/mattmccutchen
Matt McCutchen (mattmccutchen)https://github.com/mattmccutchen
on Oct 7, 2018https://github.com/microsoft/TypeScript/issues/27144#event-1888880081
Assignability should check an index signature or rest type of the sourcehttps://github.com/mattmccutchen/TypeScript/commit/3b5caa3e0f5faec7109b5db915fe9f3bad8ecddb
https://docs.github.com/articles/closing-issues-via-commit-messages
3b5caa3https://github.com/mattmccutchen/TypeScript/commit/3b5caa3e0f5faec7109b5db915fe9f3bad8ecddb
https://github.com/mattmccutchen
Matt McCutchen (mattmccutchen)https://github.com/mattmccutchen
on Oct 7, 2018https://github.com/microsoft/TypeScript/issues/27144#issuecomment-427630585
#27591https://github.com/microsoft/TypeScript/pull/27591
https://github.com/jcalz
Joe Calzaretta (jcalz)https://github.com/jcalz
on May 16, 2022https://github.com/microsoft/TypeScript/issues/27144#issuecomment-1128091807
Relevant SO questionhttps://stackoverflow.com/q/72252353/2887218
https://github.com/umenosuke
umenosukehttps://github.com/umenosuke
on Nov 20, 2024https://github.com/microsoft/TypeScript/issues/27144#issuecomment-2487501327
https://github.com/umenosuke
umenosukehttps://github.com/umenosuke
on Nov 20, 2024https://github.com/microsoft/TypeScript/issues/27144#issuecomment-2487564210
linkhttps://www.typescriptlang.org/play/?ts=5.8.0-dev.20241119#code/N4WAUABFEC4J4AcCmEBmBLANigvBUk0RAJugM4KYCGcAclQLZID8AXBGTAE7oB2A5gBpwRImXQAvFu14BXBgCMkXYYSgBfANzgR0AMYB7XpzRYkZdsAgBtXoyTtOPAQF12GbBHUQ8BUdAAiAAsDfiQQsIA6BAEAy3VVfygA+SpUyIArBH44-F0k6FIKajp7dgCADyrqgMSC6HEpdgBGAAZ2uv8E-K9tMB6AegGIAGUkGAhiJFQ0zAmANypMWXMIQGgCNdQDLghZXimMXiRiCAQuA2QuGHRzQeGAMW2IJArGSiRBNHOGCAApEYA8rQeqg9nprkYOOMACLTJayGAABXOl3gAApUO4zBAAD67fbTPjHACU7AASkgAI6ydBcY4AHg8SAAfHk1KI6TBZFxeGz6oVyJQaPQmO5mJEikLSkwIMxmBAAgdZhM7Exaj0Co0HGhxVrZfLWp1RFoeuodOytjs0YZjBMANZIOAQPimbBkYl8pJ+fkQIYQACSEAA7lReDBjrADMGeOHYEFyBqkjaTKgfFCYLCZsskSjlOimWRrA64C5iX0fRBkwZsJFMKE0QEQ2Hamgy4mNO3Pfy-YGg+dYzB42QIAonQxyDAqA7O0Q-QAhBFx5QoEPD3hR5TnLiRGf6IwptNkGFw7PIi55uAYszu8s+qs1uv8BuAGXJAPB-LdQbfZRDN7N-v6AA
https://github.com/jthemphill
Jeff Hemphill (jthemphill)https://github.com/jthemphill
on Apr 23, 2025https://github.com/microsoft/TypeScript/issues/27144#issuecomment-2825552889
umenosukehttps://github.com/umenosuke
Playground Linkhttps://www.typescriptlang.org/play/?ts=5.8.0-dev.20241119#code/N4WAUABFEC4J4AcCmEBmBLANigvBUk0RAJugM4KYCGcAclQLZID8AXBGTAE7oB2A5gBpwRImXQAvJO14BXBgCMkXYYSgBfANzgR0AMYB7XpzRYkZdsAgBtXo2kduffgF12GbBHUQ8BUdAAiAAsDfiQQsIA6BAEAy3EpdgAGdVV-KAD5KizIgCsEfjj8XXToUgpqOnt2AIAPeoaAtNLoBIcARiSu5v9Ukq9tMH6AemGIAGUkGAhiJFRszGmANypMWXMIQGgCTdQDLghZXlmMXiRiCAQuA2QuGHRzEbGAMT2IJFrGSiRBNCuGCAAUuMAPK0fqoQ56O5GDhTAAic1WshgAAUrjd4AAKVDuMwQAA+ByOcz4ZwAlOwAEpIACOsnQXDOAB4PEgAHzFNSiRkwWRcXiclplciUGj0JjuZiRcqiqpMCDMZgQALHBbTOxMJr9UptSWRNoKpVJHqiLT9dQ6Lm7faYwzGaYAayQcAgfFM2DIZMF6T8QogowgAEkIAB3Ki8GBnWAGUM8SOwILkbXpO0mVA+WEwBHzNao9HKLGssjWJ1wFxkwZ+iCpgzYSKYUKYgJhiNNNAV5MaTveoUB4Mhq7xmCJsgQBQuhjkGBUJ3dogBgBCyITyhQYdHvBjyiuXEic-0RjTGbI8MRubR1wLcGxZk9lb9NbrDf4TcAMuSAeD+26gO1yiBauf+-5AA
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Domain: Index TypesIssues with `keyof`https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20Index%20Types%22
on Oct 16, 2025https://github.com/microsoft/TypeScript/issues/27144#event-20330935871
https://github.com/umenosuke
umenosukehttps://github.com/umenosuke
on Jun 3, 2026https://github.com/microsoft/TypeScript/issues/27144#issuecomment-4614095827
linkhttps://www.typescriptlang.org/play/?ts=6.0.0-dev.20260416#code/C4TwDgpgBAglC8UDeBYAUFTsD6BDfuA-AFxQDOwATgJYB2A5gDToC+A3OugMYD2tFUAEakkUANq1cAWwikKNBgF1SgnjwA2EXLSgsEydFigAiGHgLHSVAK4RmadpzQAza7S7BqfKK-cANAApnUjgAHyg3ABMIZzoISIBKEUMsAlw5KjomVgMMLEoIYGtKHVQ8o0w00mdCADozNKhCQhNo51xrdWAoSRljeyNHBycyo15+bucARn1fLkDBBLYoAHoVqEAZcigAOR4oXikwak0oCEpKHkpGIWtunluwW7IRKCqoG2gWFMxxsg0IWrqHj0ALGDaAeD-+j4pksnEY1lAAJLdahkU4AR2s1AAbrhNLRusA9rgyGQzp4GO8ABbQUCQKDqagAa1pVNRtW++z4AmcACZZm55gFBK80W4mbQeAB3HQk2Cw8pc-j-QHA0EQqF8hVfNBAA
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/27144
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/27144
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Domain: Index TypesIssues with `keyof`https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20Index%20Types%22
BacklogNo due datehttps://github.com/microsoft/TypeScript/milestone/29
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.