Title: tsc --init update 2024 · Issue #58420 · microsoft/TypeScript · GitHub
Open Graph Title: tsc --init update 2024 · Issue #58420 · microsoft/TypeScript
X Title: tsc --init update 2024 · Issue #58420 · microsoft/TypeScript
Description: Acknowledgement I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion. Comment Following up from #58417 Note: This is only for argumentless tsc --init. We know that it's ph...
Open Graph Description: Acknowledgement I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion. Comment Following up from #58417 Note: This is only for argum...
X Description: Acknowledgement I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion. Comment Following up from #58417 Note: This is only for a...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/58420
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"tsc --init update 2024","articleBody":"### Acknowledgement\r\n\r\n- [X] I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.\r\n\r\n### Comment\r\n\r\nFollowing up from #58417\r\n\r\nNote: This is only for *argumentless* `tsc --init`. We know that it's physically possible to write text after `--init` and that text could do something, but that's a separate issue. Since `tsc --init` should do *something*, this issue is only about what that something is.\r\n\r\nGeneral consensus from the design meeting + external discussion:\r\n * No one likes the huge wall of text\r\n * Not many people like the commented-out options, and certainly not the \"terrible idea\" commented-out options\r\n * `\"module\": \"commonjs\"` is a hard no\r\n\r\nOther live issues:\r\n * #39354 - set `types` to `[]` - yes\r\n * #49206, #39308 - increase default target - also yes\r\n * #39311 - set `udfcf` - I would argue moot by now since we should set the target high enough that this doesn't matter\r\n * #51207 - consult `package.json` - it's not obvious that your `package.json` is configured yet at the time you run `tsc --init`, this seems marginal\r\n\r\nOther things we didn't get to:\r\n * `rootDir`, `outDir`: These are generally a good idea; no one likes the default side-by-side JS emit buuut there aren't strictly universal conventions here\r\n\r\nProposed new output:\r\n```jsonc\r\n{\r\n // For more info, see https://aka.ms/tsconfig\r\n // Or use the tsc-init wizard: https://aka.ms/tsc-init\r\n \"compilerOptions\": {\r\n \"target\": \"es2022\",\r\n \"module\": \"nodenext\",\r\n \"rootDir\": \"./src\",\r\n \"outDir\": \"./dist\",\r\n\r\n // For nodejs, add \"node\" to this array,\r\n // and remove \"dom\" from \"lib\"\r\n \"types\": [],\r\n \"lib\": [\"dom\", \"es2022\"],\r\n\r\n // Other outputs\r\n \"sourceMap\": true,\r\n // \"declaration: true,\r\n\r\n // Typechecking options\r\n \"noUncheckedIndexedAccess\": true,\r\n \"exactOptionalPropertyTypes\": true,\r\n\r\n // Style options\r\n // \"noImplicitReturns\": true,\r\n // \"noImplicitOverride\": true,\r\n // \"noUnusedLocals\": true,\r\n // \"noUnusedParameters\": true,\r\n // \"noFallthroughCasesInSwitch\": true,\r\n // \"noPropertyAccessFromIndexSignature\": true,\r\n\r\n // We recommend all of these options\r\n \"verbatimModuleSyntax\": true,\r\n \"isolatedModules\": true,\r\n \"moduleDetection\": \"force\",\r\n \"skipLibCheck\": true,\r\n \"strict\": true\r\n }\r\n}\r\n```\r\nI tried to order this from \"most likely to edit\" to \"least likely to edit\"","author":{"url":"https://github.com/RyanCavanaugh","@type":"Person","name":"RyanCavanaugh"},"datePublished":"2024-05-02T23:01:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":40},"url":"https://github.com/58420/TypeScript/issues/58420"}
| 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:66796eb0-e5c7-f3d3-7b4d-f49eb486f043 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 996C:1EDE:9AEB8E:DFBA40:6A4CD97F |
| html-safe-nonce | 315bbd9c5c0f74bdfdfac874e2ea6f177696242dd9413f220452e44b133ac971 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTZDOjFFREU6OUFFQjhFOkRGQkE0MDo2QTRDRDk3RiIsInZpc2l0b3JfaWQiOiI2OTQ2NDUyNTM3NDkxNjQyNzUxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ce23ac0b5d8f0cc2f774e56ad1a61a12b317c29cc43dc9a451b33322e94a15e5 |
| hovercard-subject-tag | issue:2276640508 |
| 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/58420/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4eec4f8376f5e9f0984ea9f3688956ac70eb5ac7d4a6e9902b2f029f5992e69d/microsoft/TypeScript/issues/58420 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4eec4f8376f5e9f0984ea9f3688956ac70eb5ac7d4a6e9902b2f029f5992e69d/microsoft/TypeScript/issues/58420 |
| og:image:alt | Acknowledgement I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion. Comment Following up from #58417 Note: This is only for argum... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | RyanCavanaugh |
| hostname | github.com |
| expected-hostname | github.com |
| None | 299b43bca6e02ad35197ffeba30d2466846d5fb02ab96fbced5b5e6cec589fb8 |
| 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 | 3eeb74f55ccd8a31bdaec6839577c592bbf7844c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width