Title: If call doesn’t resolve to an overload signature, issue a better error when the implementation would work · Issue #25488 · microsoft/TypeScript · GitHub
Open Graph Title: If call doesn’t resolve to an overload signature, issue a better error when the implementation would work · Issue #25488 · microsoft/TypeScript
X Title: If call doesn’t resolve to an overload signature, issue a better error when the implementation would work · Issue #25488 · microsoft/TypeScript
Description: interface Foo { hello: string }; function bar1(...foos: Foo[]) { bar2(...foos); } function bar2(foo1: Foo); function bar2(foo1: Foo, foo2: Foo); function bar2(...foos: Foo[]) { return; } Here we provide an error message like Expected 1-2...
Open Graph Description: interface Foo { hello: string }; function bar1(...foos: Foo[]) { bar2(...foos); } function bar2(foo1: Foo); function bar2(foo1: Foo, foo2: Foo); function bar2(...foos: Foo[]) { return; } Here we pr...
X Description: interface Foo { hello: string }; function bar1(...foos: Foo[]) { bar2(...foos); } function bar2(foo1: Foo); function bar2(foo1: Foo, foo2: Foo); function bar2(...foos: Foo[]) { return; } Here we pr...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/25488
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"If call doesn’t resolve to an overload signature, issue a better error when the implementation would work","articleBody":"```ts\r\ninterface Foo { hello: string };\r\n\r\nfunction bar1(...foos: Foo[]) {\r\n bar2(...foos);\r\n}\r\n\r\nfunction bar2(foo1: Foo);\r\nfunction bar2(foo1: Foo, foo2: Foo);\r\nfunction bar2(...foos: Foo[]) {\r\n return;\r\n}\r\n```\r\n\r\nHere we provide an error message like\r\n\r\n```\r\nExpected 1-2 arguments, but got 0 or more.\r\n```\r\n\r\nI just spoke to three engineers who had no indication of what was actually going wrong. We should\r\n\r\n* Inform the user that implementation signatures aren't part of the overload set, and that they should consider making the overload an implementation signature\r\n* Provide a quick fix to do so.","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2018-07-06T21:18:00Z","url":"https://github.com/microsoft/TypeScript/issues/25488"}
| 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:1861d1e0-f280-e6ba-e5be-8df6cbd49bc4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CB26:2BE220:1BE8FC6:25398A4:6B0163BC |
| html-safe-nonce | 0a77cc2181873e309125e60880c32f7b7d5f2be6840a8ebcf2e92afa5c0b14f4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQjI2OjJCRTIyMDoxQkU4RkM2OjI1Mzk4QTQ6NkIwMTYzQkMiLCJ2aXNpdG9yX2lkIjoiODg3ODgwMzk3NTE4MTI2MzgwNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 93a9a1bb1901aa52a59da2e4e1bbe10162bd75434a54b8e6373d4c4685d68d5d |
| hovercard-subject-tag | issue:339074129 |
| 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/25488/issue_layout |
| twitter:image | https://opengraph.githubassets.com/68cf72e310e02dba6feccd4aa3842081191f2c3d3d36b511128a3bfea1420f38/microsoft/TypeScript/issues/25488 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/68cf72e310e02dba6feccd4aa3842081191f2c3d3d36b511128a3bfea1420f38/microsoft/TypeScript/issues/25488 |
| og:image:alt | interface Foo { hello: string }; function bar1(...foos: Foo[]) { bar2(...foos); } function bar2(foo1: Foo); function bar2(foo1: Foo, foo2: Foo); function bar2(...foos: Foo[]) { return; } Here we pr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DanielRosenwasser |
| 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 |
Links:
Viewport: width=device-width