René's URL Explorer Experiment


Title: [Feature request] sort literals in .d.ts · Issue #32224 · microsoft/TypeScript · GitHub

Open Graph Title: [Feature request] sort literals in .d.ts · Issue #32224 · microsoft/TypeScript

X Title: [Feature request] sort literals in .d.ts · Issue #32224 · microsoft/TypeScript

Description: Search Terms Suggestion sort string literal in .d.ts Use Cases avoid string literal random change order when source code didn't change and make code history is more easy read in this issue thread string literal is mean => "a" | "c" | "b"...

Open Graph Description: Search Terms Suggestion sort string literal in .d.ts Use Cases avoid string literal random change order when source code didn't change and make code history is more easy read in this issue thread s...

X Description: Search Terms Suggestion sort string literal in .d.ts Use Cases avoid string literal random change order when source code didn't change and make code history is more easy read in this issue thre...

Opengraph URL: https://github.com/microsoft/TypeScript/issues/32224

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Feature request] sort literals in .d.ts","articleBody":"\u003c!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨\r\n\r\nHalf of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Please read the FAQ first, especially the \"Common Feature Requests\" section.\r\n\r\n-->\r\n\r\n## Search Terms\r\n\r\n\u003c!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->\r\n\r\n## Suggestion\r\n\r\n\u003c!-- A summary of what you'd like to see added or changed -->\r\n\r\nsort string literal in .d.ts\r\n\r\n## Use Cases\r\n\r\n\u003c!--\r\nWhat do you want to use this for?\r\nWhat shortcomings exist with current approaches?\r\n-->\r\n\r\navoid string literal random change order when source code didn't change\r\nand make code history is more easy read\r\n\r\nin this issue thread `string literal` is mean => `\"a\" | \"c\" | \"b\"`\r\n\r\nthis not only happen on `Record`, it has chance happen at all type is auto create by typescript emit with `string literal`\r\n\r\n## Examples\r\n\r\n\u003c!-- Show how this would be used and what the behavior would be -->\r\n\r\n> `\"a\" | \"c\" | \"b\"` is create by typesctipt emit and some time will random change order\r\n\r\n- https://github.com/bluelovers/cjk-convert/blob/1a0ba9f85e0bf7fe916158cc14a4ef87507106d9/lib/zh/table/table.ts#L1619-L1635\r\n- https://github.com/microsoft/TypeScript/issues/30328\r\n  - https://github.com/bluelovers/novel-travis-test/commit/3b88745e187736797d9a30d4f4bbd927b0c6dd30#diff-3006c96d8657ccca5b9b3618a256314c\r\n  - https://github.com/bluelovers/novel-travis-test/commit/d33c4a61602a8536d1414d36e027eb99845104f1#diff-3006c96d8657ccca5b9b3618a256314c\r\n  - https://github.com/bluelovers/novel-travis-test/commit/2d749195c39ef386e6c4bad1ae6e19d007c03e93#diff-3006c96d8657ccca5b9b3618a256314c\r\n\r\n### current .d.ts output\r\n\r\n---\r\n\r\n```ts\r\nexport declare const table_plus: Record\u003c\"a\" | \"c\" | \"b\">\r\n// \"a\" | \"c\" | \"b\" is random change order\r\n```\r\n\r\n### in this request\r\n\r\n> sort ( use simple array.sort() ) it when output emit at `.d.ts`\r\n\r\n```ts\r\nexport declare const table_plus: Record\u003c\"a\" | \"b\" | \"c\">\r\n```\r\n\r\n## Checklist\r\n\r\nMy suggestion meets these guidelines:\r\n\r\n* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code\r\n* [x] 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* [x] 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*Maintainer's note* [@sandersn]: To implementers: When you implement this, be sure to sort other literal types too. Consider sorting other things, like symbol, by the order of their string representation.","author":{"url":"https://github.com/bluelovers","@type":"Person","name":"bluelovers"},"datePublished":"2019-07-02T23:21:34Z","url":"https://github.com/microsoft/TypeScript/issues/32224"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:104774de-cf5e-b104-828b-23802eb8147d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id82A4:DA744:2731C47:34C26BF:6B01BD06
html-safe-nonce9ef94bf8203f42b0799aaa02bd7677d064c72368902cf3973295045ec183f2db
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MkE0OkRBNzQ0OjI3MzFDNDc6MzRDMjZCRjo2QjAxQkQwNiIsInZpc2l0b3JfaWQiOiI4NzcyMTQ5OTY4NjAyNTEyNjQ2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacea4e87bd50aaa321bc9ff60b54b788152be9a5a88768df93ed94b2d6bad6a293
hovercard-subject-tagissue:463476437
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/32224/issue_layout
twitter:imagehttps://opengraph.githubassets.com/32bd8caa768d302d717a60b2730b648b9a0f047fb1f8d1bb4b169347f788c020/microsoft/TypeScript/issues/32224
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/32bd8caa768d302d717a60b2730b648b9a0f047fb1f8d1bb4b169347f788c020/microsoft/TypeScript/issues/32224
og:image:altSearch Terms Suggestion sort string literal in .d.ts Use Cases avoid string literal random change order when source code didn't change and make code history is more easy read in this issue thread s...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebluelovers
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id20929025
octolytics-dimension-repository_nwomicrosoft/TypeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20929025
octolytics-dimension-repository_network_root_nwomicrosoft/TypeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/32224#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F32224
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F32224
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/32224
Reloadhttps://github.com/microsoft/TypeScript/issues/32224
Reloadhttps://github.com/microsoft/TypeScript/issues/32224
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests312 (312)https://github.com/microsoft/TypeScript/pulls
Actionshttps://github.com/microsoft/TypeScript/actions
Projectshttps://github.com/microsoft/TypeScript/projects
Wikihttps://github.com/microsoft/TypeScript/wiki
Security and qualityhttps://github.com/microsoft/TypeScript/security
Insightshttps://github.com/microsoft/TypeScript/insights
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/32224
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/32224
[Feature request] sort literals in .d.tshttps://github.com/microsoft/TypeScript/issues/32224#top
Effort: DifficultGood luck.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Effort%3A%20Difficult%22
Experience EnhancementNoncontroversial enhancementshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Experience%20Enhancement%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
Backloghttps://github.com/microsoft/TypeScript/milestone/29
https://github.com/bluelovers
bluelovers (bluelovers)https://github.com/bluelovers
on Jul 2, 2019https://github.com/microsoft/TypeScript/issues/32224#issue-463476437
https://github.com/bluelovers/cjk-convert/blob/1a0ba9f85e0bf7fe916158cc14a4ef87507106d9/lib/zh/table/table.ts#L1619-L1635https://github.com/bluelovers/cjk-convert/blob/1a0ba9f85e0bf7fe916158cc14a4ef87507106d9/lib/zh/table/table.ts#L1619-L1635
output declaration type random change order #30328https://github.com/microsoft/TypeScript/issues/30328
bluelovers/novel-travis-test@3b88745#diff-3006c96d8657ccca5b9b3618a256314chttps://github.com/bluelovers/novel-travis-test/commit/3b88745e187736797d9a30d4f4bbd927b0c6dd30#diff-3006c96d8657ccca5b9b3618a256314c
bluelovers/novel-travis-test@d33c4a6#diff-3006c96d8657ccca5b9b3618a256314chttps://github.com/bluelovers/novel-travis-test/commit/d33c4a61602a8536d1414d36e027eb99845104f1#diff-3006c96d8657ccca5b9b3618a256314c
bluelovers/novel-travis-test@2d74919#diff-3006c96d8657ccca5b9b3618a256314chttps://github.com/bluelovers/novel-travis-test/commit/2d749195c39ef386e6c4bad1ae6e19d007c03e93#diff-3006c96d8657ccca5b9b3618a256314c
TypeScript's Design Goalshttps://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals
Nathan Shively-Sanders (@sandersn)https://github.com/sandersn
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featurehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Awaiting%20More%20Feedback%22
good first issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22good%20first%20issue%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
on Jul 2, 2019https://github.com/microsoft/TypeScript/issues/32224#event-2455933074
https://github.com/AnyhowStep
AnyhowStephttps://github.com/AnyhowStep
on Jul 3, 2019https://github.com/microsoft/TypeScript/issues/32224#issuecomment-507886830
#29255https://github.com/microsoft/TypeScript/issues/29255
https://github.com/fatcerberus
Bruce Pascoe (fatcerberus)https://github.com/fatcerberus
on Jul 3, 2019https://github.com/microsoft/TypeScript/issues/32224#issuecomment-507899365
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
Experience EnhancementNoncontroversial enhancementshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Experience%20Enhancement%22
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featurehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Awaiting%20More%20Feedback%22
on Jul 3, 2019https://github.com/microsoft/TypeScript/issues/32224#event-2458083619
https://github.com/sandersn
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
on Jul 3, 2019https://github.com/microsoft/TypeScript/issues/32224#issuecomment-508155321
Bruce Pascoe (@fatcerberus)https://github.com/fatcerberus
AnyhowStephttps://github.com/AnyhowStep
https://github.com/AnyhowStep
AnyhowStephttps://github.com/AnyhowStep
on Jul 3, 2019https://github.com/microsoft/TypeScript/issues/32224#issuecomment-508159064
https://github.com/tp
Timm Preetz (tp)https://github.com/tp
on Aug 9, 2019https://github.com/microsoft/TypeScript/issues/32224#issuecomment-519948208
https://user-images.githubusercontent.com/52437/62787712-9608e600-bac5-11e9-9fa7-7e7a4a172d11.png
https://github.com/sandersn
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
on Aug 9, 2019https://github.com/microsoft/TypeScript/issues/32224#issuecomment-519977838
Timm Preetz (@tp)https://github.com/tp
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Backloghttps://github.com/microsoft/TypeScript/milestone/29
on Aug 16, 2019https://github.com/microsoft/TypeScript/issues/32224#event-2562922182
https://github.com/AnyhowStep
AnyhowStephttps://github.com/AnyhowStep
on Aug 27, 2019https://github.com/microsoft/TypeScript/issues/32224#issuecomment-525261314
https://user-images.githubusercontent.com/5655961/63768000-12107580-c89d-11e9-914b-b017ec120b6d.png
https://github.com/sandersn
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
on Aug 27, 2019https://github.com/microsoft/TypeScript/issues/32224#issuecomment-525375337
AnyhowStephttps://github.com/AnyhowStep
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
on Aug 27, 2019https://github.com/microsoft/TypeScript/issues/32224#event-2587687152
bluelovers (bluelovers)https://github.com/bluelovers
on Jun 6, 2020https://github.com/microsoft/TypeScript/issues/32224#event-3415072862
chore: avoid microsoft/TypeScript#32224https://github.com/bluelovers/ws-string/commit/129388e07296de7c2ded11a2861f692e6f1ee5f0
microsoft/TypeScript#32224https://github.com/microsoft/TypeScript/issues/32224
129388ehttps://github.com/bluelovers/ws-string/commit/129388e07296de7c2ded11a2861f692e6f1ee5f0
bluelovers (bluelovers)https://github.com/bluelovers
on Jun 20, 2020https://github.com/microsoft/TypeScript/issues/32224#event-3464735287
chore: avoid microsoft/TypeScript#32224https://github.com/bluelovers/runes/commit/ec12f3f72ad50c2aea8e92f712988f67c898c550
microsoft/TypeScript#32224https://github.com/microsoft/TypeScript/issues/32224
ec12f3fhttps://github.com/bluelovers/runes/commit/ec12f3f72ad50c2aea8e92f712988f67c898c550
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
on May 28, 2021https://github.com/microsoft/TypeScript/issues/32224#event-4814968840
TypeScript Bot (typescript-bot)https://github.com/typescript-bot
Fix AvailableA PR has been opened for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fix%20Available%22
on Jun 16, 2021https://github.com/microsoft/TypeScript/issues/32224#event-4898873922
https://github.com/sandersn
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
on Jun 22, 2021https://github.com/microsoft/TypeScript/issues/32224#issuecomment-866220081
#44614https://github.com/microsoft/TypeScript/pull/44614
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
Effort: DifficultGood luck.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Effort%3A%20Difficult%22
good first issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22good%20first%20issue%22
Fix AvailableA PR has been opened for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fix%20Available%22
on Jun 30, 2021https://github.com/microsoft/TypeScript/issues/32224#event-4960901903
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
on Jun 30, 2021https://github.com/microsoft/TypeScript/issues/32224#event-4960902764
bluelovers (bluelovers)https://github.com/bluelovers
on Jul 20, 2021https://github.com/microsoft/TypeScript/issues/32224#event-5046514005
ci: use `git reset --hard` for avoid microsoft/TypeScript#32224https://github.com/bluelovers/ws-rest/commit/ab8bbd22308686222fac77a1eba9cefe25828994
microsoft/TypeScript#32224https://github.com/microsoft/TypeScript/issues/32224
ab8bbd2https://github.com/bluelovers/ws-rest/commit/ab8bbd22308686222fac77a1eba9cefe25828994
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/32224
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/32224
Effort: DifficultGood luck.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Effort%3A%20Difficult%22
Experience EnhancementNoncontroversial enhancementshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Experience%20Enhancement%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
BacklogNo due datehttps://github.com/microsoft/TypeScript/milestone/29
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.