Title: Design Meeting Notes, 3/26/2024 · Issue #57980 · microsoft/TypeScript · GitHub
Open Graph Title: Design Meeting Notes, 3/26/2024 · Issue #57980 · microsoft/TypeScript
X Title: Design Meeting Notes, 3/26/2024 · Issue #57980 · microsoft/TypeScript
Description: Format Types Consistently in Baselines and Underlining Type Node Generation #57890 weswigham#69 As we try to maximize node reuse, we realized we have no indication as to whether that is taking place apart from whitespace as a heuristic. ...
Open Graph Description: Format Types Consistently in Baselines and Underlining Type Node Generation #57890 weswigham#69 As we try to maximize node reuse, we realized we have no indication as to whether that is taking plac...
X Description: Format Types Consistently in Baselines and Underlining Type Node Generation #57890 weswigham#69 As we try to maximize node reuse, we realized we have no indication as to whether that is taking plac...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/57980
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design Meeting Notes, 3/26/2024","articleBody":"# Format Types Consistently in Baselines and Underlining Type Node Generation\r\n\r\n* https://github.com/microsoft/TypeScript/pull/57890\r\n* https://github.com/weswigham/TypeScript/pull/69\r\n\r\n* As we try to maximize node reuse, we realized we have no indication as to whether that is taking place apart from whitespace as a heuristic.\r\n* Even then, preserving whitespace isn't always desirable.\r\n* This PR adjusts type baselines to always apply the same formatting consistently.\r\n* A separate PR adds an underline to indicate when a node was synthesized.\r\n* What are we trying to catch here?\r\n * Lack of node reuse.\r\n * Could exhaustively check things, but better off using our current infrastructure.\r\n* Kind of a pain to read these.\r\n* Is it arguable that the underlines actually indicate that you *should* pay attention even if you only care about the types?\r\n * Maybe.\r\n* Aside: do we need symbol baselines?\r\n\r\n# `tsc --noCheck`\r\n\r\nhttps://github.com/microsoft/TypeScript/pull/57934\r\n\r\n* For TypeScript? Isn't that *weird*??\r\n* Idea: allows people to perform a check and a build separately.\r\n* Declaration emit actually *surprisingly* works here. Most of the information can be calculated lazily, and so it avoids a *full* check.\r\n* Unfortunately, JavaScript emit actually calculates some information in the checker.\r\n* This is *very surprisingly fast*.\r\n* The only downside of using `--noCheck` for declaration emit is that it may differ in output from stuff like union ordering (which depends on types being assigned IDs, which is sensitive to check order).\r\n* Our main goal is to be a type-checker.\r\n* How does this work with syntax errors?\r\n * You *won't* get them.\r\n* Unclear if it's a good idea to bring this in without making this possible for the JS side. We need to try decoupling JS emit to see what if anything regresses.\r\n* Mixture of support for the concept of `--noCheck`, but if we can unlock this for `transpileModule` that would be a big win.\r\n* Don't want to add a command line flag just yet.\r\n* Bike-shed a name.\r\n * `skipCheck`?\r\n * `noCheck` to parallel `noEmit`?\r\n\r\n# Respect `type` in `package.json` in more `module` modes\r\n\r\nhttps://github.com/microsoft/TypeScript/pull/57896\r\n\r\n* Some notable changes:\r\n * A `.cjs` module under `--module esnext` got emitted with ES syntax; no longer does.\r\n * People using `.cts` files under `--moduleResolution bundler --module esnext` (aside: nowadays `--module preserve` is what most of these people want), we would resolve with the `import` condition, now resolves with the `require` condition.\r\n * Kind of weird under `--preserve`, but 🤷♂️.\r\n * Under `--module preserve`, we issue something like `verbatimModuleSyntax` errors because it won't be interpreted the same way from a declaration file.\r\n* Did *not* add logic to disallow CommonJS input files. Presumably a program-level error if we wanted to add it.\r\n","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2024-03-28T03:29:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/57980/TypeScript/issues/57980"}
| 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:59fbcb2a-3ffb-26a3-f555-8a68b5bf740b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8EB6:1846A4:486D176:5FB1209:6A5D83AA |
| html-safe-nonce | fe26fe5054d5f298b9e188b5e59ff795bd23f8431079cc09124ec9337f2f6747 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RUI2OjE4NDZBNDo0ODZEMTc2OjVGQjEyMDk6NkE1RDgzQUEiLCJ2aXNpdG9yX2lkIjoiMTU4NjgyNjU2MDM1OTIwMzc1NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b08c9f9ee5e183cf50392889ebdc331dab5ed9375da2a3398ba4dd0ebbc684ee |
| hovercard-subject-tag | issue:2212276170 |
| 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/57980/issue_layout |
| twitter:image | https://opengraph.githubassets.com/129a66667740910d8a062dec886907e94804e870620c6de5e36e8696c63bada2/microsoft/TypeScript/issues/57980 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/129a66667740910d8a062dec886907e94804e870620c6de5e36e8696c63bada2/microsoft/TypeScript/issues/57980 |
| og:image:alt | Format Types Consistently in Baselines and Underlining Type Node Generation #57890 weswigham#69 As we try to maximize node reuse, we realized we have no indication as to whether that is taking plac... |
| 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 | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| 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 | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width