Title: Improve structure, formatting, (human) parsability and readabiliy of errors · Issue #29059 · microsoft/TypeScript · GitHub
Open Graph Title: Improve structure, formatting, (human) parsability and readabiliy of errors · Issue #29059 · microsoft/TypeScript
X Title: Improve structure, formatting, (human) parsability and readabiliy of errors · Issue #29059 · microsoft/TypeScript
Description: Suggestion Comparing my DX/UX experience from working with flow versus TypeScript, the error messages is one of the few things that I preferred how flow does it. Especially after flow v0.66 release. I believe they integrated alot from th...
Open Graph Description: Suggestion Comparing my DX/UX experience from working with flow versus TypeScript, the error messages is one of the few things that I preferred how flow does it. Especially after flow v0.66 release...
X Description: Suggestion Comparing my DX/UX experience from working with flow versus TypeScript, the error messages is one of the few things that I preferred how flow does it. Especially after flow v0.66 release...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/29059
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve structure, formatting, (human) parsability and readabiliy of errors","articleBody":"## Suggestion\r\n\r\nComparing my DX/UX experience from working with flow versus TypeScript, the error messages is one of the few things that I preferred how flow does it. Especially after flow v0.66 release. I believe they integrated alot from the [glow](https://github.com/jamiebuilds/glow) project. I would love it if typescript would adopt some for the formatting and helpful information that flow has in their error messages.\r\n\r\nThis blog post explains more about the flow 0.66 error message changes: http://medium.com/flow-type/better-flow-error-messages-for-the-javascript-ecosystem-73b6da948ae2\r\n\r\nHere are a couple of things I can think of that would help me find the actual problem/conflict that I can take action on:\r\n\r\n- prettifying/formatting the outputted types\r\n- syntax highlighting\r\n- bold/highlight the conflicting parts\r\n\r\n## Use Cases\r\n\r\nEvery time typescript finds an error (which us developers will have to read and understand and take action on :) ). I am talking both on the command line but also in IDEs like vscode. There is an issue related to this in the vscode repo here: https://github.com/Microsoft/vscode/issues/54503\r\n\r\n## Examples\r\n\r\nHeres and example of the ginormous unstructured blob of text that is a ts error with big types involved:\r\n\r\n```Type '({ expandedRowIds, orderBy, currentPage, filters: { columns: columnFilters, period, categoryIds }, ...restUrlQueryState }: Pick\u003cOverwrite\u003cDataGridUrlQueryStateUrlSerialized, { filters: { columns: { promotionName?: string | undefined; startDate?: string | undefined; endDate?: string | undefined; \"sumFacts.switching.amount\"?: string | undefined; \"sumFacts.netLift.profit\"?: string | undefined; \"sumFacts.netLift.amount\"?: string | undefined; }; period: Date[]; categoryIds: string[]; }; }>, \"hiddenColumnNames\" | \"filters\" | \"orderBy\" | \"expandedRowIds\" | \"currentPage\">, pageSize: any) => Dictionary\u003cany>' is not assignable to type '(a: Overwrite\u003cDataGridUrlQueryStateUrlSerialized, { filters: { columns: { promotionName?: string | undefined; startDate?: string | undefined; endDate?: string | undefined; \"sumFacts.switching.amount\"?: string | undefined; \"sumFacts.netLift.profit\"?: string | undefined; \"sumFacts.netLift.amount\"?: string | undefined; }; period: Date[]; categoryIds: string[]; }; }>) => DataGridQueryVariables'.```\r\n\r\n## Checklist\r\n\r\nMy suggestion meets these guidelines:\r\n\r\n* [ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code\r\n* [ ] This wouldn't change the runtime behavior of existing JavaScript code\r\n* [ ] This could be implemented without emitting different JS based on the types of the expressions\r\n* [ ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)\r\n* [ ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).\r\n\r\n","author":{"url":"https://github.com/emattias","@type":"Person","name":"emattias"},"datePublished":"2018-12-17T09:30:17Z","url":"https://github.com/microsoft/TypeScript/issues/29059"}
| 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:6378a372-f0f5-55b3-6b2e-3762c83a8a88 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9E64:27D3AD:104F202:14BA18A:6B0111D5 |
| html-safe-nonce | 274b699edb3891d327c1214dd405f578f9251f3eea88817ea9aa8d0db254d865 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTY0OjI3RDNBRDoxMDRGMjAyOjE0QkExOEE6NkIwMTExRDUiLCJ2aXNpdG9yX2lkIjoiMTI2NzE5ODM1ODM3Njc0NzQ3OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c970e57e20d6820de22de43c97c5de6d056d2e719602f0c717524e6502a9a895 |
| hovercard-subject-tag | issue:391624367 |
| 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/29059/issue_layout |
| twitter:image | https://opengraph.githubassets.com/87883f16e02ad7363d4e2f83e3d0c38fe11d594215fa60a9107e3d7e47916154/microsoft/TypeScript/issues/29059 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/87883f16e02ad7363d4e2f83e3d0c38fe11d594215fa60a9107e3d7e47916154/microsoft/TypeScript/issues/29059 |
| og:image:alt | Suggestion Comparing my DX/UX experience from working with flow versus TypeScript, the error messages is one of the few things that I preferred how flow does it. Especially after flow v0.66 release... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | emattias |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| 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 | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width