René's URL Explorer Experiment


Title: Cannot read property 'kind' of undefined at Object.parenthesizeArrayTypeMember · Issue #26153 · microsoft/TypeScript · GitHub

Open Graph Title: Cannot read property 'kind' of undefined at Object.parenthesizeArrayTypeMember · Issue #26153 · microsoft/TypeScript

X Title: Cannot read property 'kind' of undefined at Object.parenthesizeArrayTypeMember · Issue #26153 · microsoft/TypeScript

Description: TypeScript Version: 3.1.0-dev.20180802 Search Terms: Cannot read property 'kind' of undefined Optional element in tuple ReadonlyArray Strict mode Code type Foo = [object, object?]; const bar: ReadonlyArray = [{}, {}]; Expected behav...

Open Graph Description: TypeScript Version: 3.1.0-dev.20180802 Search Terms: Cannot read property 'kind' of undefined Optional element in tuple ReadonlyArray Strict mode Code type Foo = [object, object?]; const bar: Reado...

X Description: TypeScript Version: 3.1.0-dev.20180802 Search Terms: Cannot read property 'kind' of undefined Optional element in tuple ReadonlyArray Strict mode Code type Foo = [object, object?]; const ba...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cannot read property 'kind' of undefined at Object.parenthesizeArrayTypeMember","articleBody":"\u003c!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:**  3.1.0-dev.20180802\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\n* Cannot read property 'kind' of undefined\r\n* Optional element in tuple\r\n* ReadonlyArray\r\n* Strict mode\r\n\r\n**Code**\r\n\r\n```ts\r\ntype Foo = [object, object?];\r\n\r\nconst bar: ReadonlyArray\u003cFoo> = [{}, {}];\r\n```\r\n\r\n**Expected behavior:**\r\nAn error along the lines of:\r\n```\r\nType '{}[]' is not assignable to type '[object, (object | undefined)?][]\r\n```\r\n\r\n**Actual behavior:**\r\n```\r\n./node_modules/typescript/lib/tsc.js:67968\r\n                throw e;\r\n                ^\r\n\r\nTypeError: Cannot read property 'kind' of undefined\r\n    at Object.parenthesizeArrayTypeMember (./node_modules/typescript/lib/tsc.js:50576:24)\r\n    at Object.createOptionalTypeNode (./node_modules/typescript/lib/tsc.js:47850:24)\r\n    at typeReferenceToTypeNode (./node_modules/typescript/lib/tsc.js:26572:44)\r\n    at typeToTypeNodeHelper (./node_modules/typescript/lib/tsc.js:26383:28)\r\n    at typeReferenceToTypeNode (./node_modules/typescript/lib/tsc.js:26560:43)\r\n    at typeToTypeNodeHelper (./node_modules/typescript/lib/tsc.js:26383:28)\r\n    at signatureToSignatureDeclarationHelper (./node_modules/typescript/lib/tsc.js:26827:52)\r\n    at createTypeNodesFromResolvedType (./node_modules/typescript/lib/tsc.js:26666:43)\r\n    at createTypeNodeFromObjectType (./node_modules/typescript/lib/tsc.js:26547:35)\r\n    at createAnonymousTypeNode (./node_modules/typescript/lib/tsc.js:26502:42)\r\n```\r\n\r\n**Conditions**\r\nIt seems this bug is only triggered if:\r\n* a `ReadonlyArray` is used – `Array` doesn't seem to trigger it\r\n* strict mode is enabled\r\n* the last element of the tuple is optional\r\n\r\n**Playground Link:**\r\n[Playground](https://www.typescriptlang.org/play/#src=type%20Foo%20%3D%20%5Bobject%2C%20object%3F%5D%3B%0D%0A%0D%0Aconst%20bar%3A%20ReadonlyArray%3CFoo%3E%20%3D%20%5B%7B%7D%2C%20%7B%7D%5D%3B%0D%0A). Be sure to enable strictNullChecks to replicate.","author":{"url":"https://github.com/victorwelling","@type":"Person","name":"victorwelling"},"datePublished":"2018-08-02T10:56:21Z","url":"https://github.com/microsoft/TypeScript/issues/26153"}

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:2b6429be-9fc3-562b-cecc-8855e72a18f6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEBD6:CC1A4:33E3C9C:42072CA:6B01D921
html-safe-nonce343bfd782df66766d944babe6d070aed2bd862aa02b6c6f9921ed6a85b285e96
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQkQ2OkNDMUE0OjMzRTNDOUM6NDIwNzJDQTo2QjAxRDkyMSIsInZpc2l0b3JfaWQiOiI0NjkyMDY3MjI2NTIwNTA4NzA1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac82b85a5efc86b52bc47c9ae91695994e092c2d3a7817ea83a89f81d3525f304d
hovercard-subject-tagissue:346961485
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/26153/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c7c8baf7a7a3ab14182c22a3bd18db4dc4e103e5bda68a5f919229c8ef1d0025/microsoft/TypeScript/issues/26153
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c7c8baf7a7a3ab14182c22a3bd18db4dc4e103e5bda68a5f919229c8ef1d0025/microsoft/TypeScript/issues/26153
og:image:altTypeScript Version: 3.1.0-dev.20180802 Search Terms: Cannot read property 'kind' of undefined Optional element in tuple ReadonlyArray Strict mode Code type Foo = [object, object?]; const bar: Reado...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamevictorwelling
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/26153#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F26153
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%2F26153
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/26153
Reloadhttps://github.com/microsoft/TypeScript/issues/26153
Reloadhttps://github.com/microsoft/TypeScript/issues/26153
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests312 (312)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/26153
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/26153
Cannot read property 'kind' of undefined at Object.parenthesizeArrayTypeMemberhttps://github.com/microsoft/TypeScript/issues/26153#top
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
TypeScript 3.1https://github.com/microsoft/TypeScript/milestone/74
https://github.com/victorwelling
Victor Welling (victorwelling)https://github.com/victorwelling
on Aug 2, 2018https://github.com/microsoft/TypeScript/issues/26153#issue-346961485
Playgroundhttps://www.typescriptlang.org/play/#src=type%20Foo%20%3D%20%5Bobject%2C%20object%3F%5D%3B%0D%0A%0D%0Aconst%20bar%3A%20ReadonlyArray%3CFoo%3E%20%3D%20%5B%7B%7D%2C%20%7B%7D%5D%3B%0D%0A
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
on Aug 2, 2018https://github.com/microsoft/TypeScript/issues/26153#event-1767989133
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Aug 8, 2018https://github.com/microsoft/TypeScript/issues/26153#event-1778991294
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
TypeScript 3.1https://github.com/microsoft/TypeScript/milestone/74
on Aug 8, 2018https://github.com/microsoft/TypeScript/issues/26153#event-1778991327
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
on Aug 14, 2018https://github.com/microsoft/TypeScript/issues/26153#event-1786673122
https://github.com/timkendrick
Tim Kendrick (timkendrick)https://github.com/timkendrick
on Sep 11, 2018https://github.com/microsoft/TypeScript/issues/26153#issuecomment-420341526
https://github.com/jonaskello
Jonas Kello (jonaskello)https://github.com/jonaskello
on Sep 14, 2018https://github.com/microsoft/TypeScript/issues/26153#issuecomment-421386887
https://github.com/yortus
Troy Gerwien (yortus)https://github.com/yortus
on Sep 17, 2018https://github.com/microsoft/TypeScript/issues/26153#issuecomment-421985685
#26433https://github.com/microsoft/TypeScript/pull/26433
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#26433https://github.com/microsoft/TypeScript/pull/26433
on Sep 17, 2018https://github.com/microsoft/TypeScript/issues/26153#event-1850970343
microsofthttps://github.com/microsoft
on Oct 21, 2025https://github.com/microsoft/TypeScript/issues/26153#event-20415757323
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/26153
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/26153
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
TypeScript 3.1https://github.com/microsoft/TypeScript/milestone/74
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.