Title: Property not found on index accessed type in a union · Issue #21464 · microsoft/TypeScript · GitHub
Open Graph Title: Property not found on index accessed type in a union · Issue #21464 · microsoft/TypeScript
X Title: Property not found on index accessed type in a union · Issue #21464 · microsoft/TypeScript
Description: interface I { [key: string]: I (...args: any[]): I } declare let y: string | I y.toUpperCase() // Error Expected: No error: both string and I separately allow property access of toUpperCase. Actual: Error, "Property 'toUpperCase' does no...
Open Graph Description: interface I { [key: string]: I (...args: any[]): I } declare let y: string | I y.toUpperCase() // Error Expected: No error: both string and I separately allow property access of toUpperCase. Actual...
X Description: interface I { [key: string]: I (...args: any[]): I } declare let y: string | I y.toUpperCase() // Error Expected: No error: both string and I separately allow property access of toUpperCase. Actual...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/21464
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Property not found on index accessed type in a union","articleBody":"```ts\r\ninterface I {\r\n [key: string]: I\r\n (...args: any[]): I\r\n}\r\n\r\ndeclare let y: string | I\r\ny.toUpperCase() // Error\r\n```\r\n\r\nExpected: No error: both `string` and `I` separately allow property access of `toUpperCase`.\r\n\r\nActual: Error, \"Property 'toUpperCase' does not exist on type 'I'.","author":{"url":"https://github.com/sandersn","@type":"Person","name":"sandersn"},"datePublished":"2018-01-29T23:30:46Z","url":"https://github.com/microsoft/TypeScript/issues/21464"}
| 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:b6daf8fd-d573-7116-9e25-7c794d559dff |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 85C6:25A204:CEE070:111A554:6B00F620 |
| html-safe-nonce | 42de51bb08c6c37c152442f49041c51e88e6cf9843f8f41ddc2b828d703bfb85 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NUM2OjI1QTIwNDpDRUUwNzA6MTExQTU1NDo2QjAwRjYyMCIsInZpc2l0b3JfaWQiOiIzOTQ3MDg4OTY5ODg3NDQ2NTYwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 779deb9f6c7163b5c9a7180f771f1fad68c86de1d442a5eb6480ee57c02bf2e9 |
| hovercard-subject-tag | issue:292599666 |
| 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/21464/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9bcf4abd222fc49ef6f38638d6ccd8ab887a61c4aa1ed8f3be8fb6ff0d03db9e/microsoft/TypeScript/issues/21464 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9bcf4abd222fc49ef6f38638d6ccd8ab887a61c4aa1ed8f3be8fb6ff0d03db9e/microsoft/TypeScript/issues/21464 |
| og:image:alt | interface I { [key: string]: I (...args: any[]): I } declare let y: string | I y.toUpperCase() // Error Expected: No error: both string and I separately allow property access of toUpperCase. Actual... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sandersn |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| 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 | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width