René's URL Explorer Experiment


Title: Provide completion lists for string literals · Issue #606 · microsoft/TypeScript · GitHub

Open Graph Title: Provide completion lists for string literals · Issue #606 · microsoft/TypeScript

X Title: Provide completion lists for string literals · Issue #606 · microsoft/TypeScript

Description: Many JavaScript frameworks are heavily based on using string values to do many things, from getting and setting attributes via the property name in string form, to defining event handlers to handle browsing to particular URLs. TypeScript...

Open Graph Description: Many JavaScript frameworks are heavily based on using string values to do many things, from getting and setting attributes via the property name in string form, to defining event handlers to handle...

X Description: Many JavaScript frameworks are heavily based on using string values to do many things, from getting and setting attributes via the property name in string form, to defining event handlers to handle...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Provide completion lists for string literals","articleBody":"Many JavaScript frameworks are heavily based on using string values to do many things, from getting and setting attributes via the property name in string form, to defining event handlers to handle browsing to particular URLs. TypeScript added specialized signatures in overloads as one means to help mitigate the pain associated with these types of APIs. Unfortunately for a number of patterns this is insufficient and not general enough. Rather than try to design a specific type system enhancement that could handle some or all of the many ways these frameworks use string literals we could try some simple tricks in Visual Studio to help out. Namely, when typing a string literal the editor should provide a completion list based on other string literals already used in your program. Some other tools already provide similar capabilities (ex Sublime Text).\n\nConsider something like this in a Backbone View class:\n\n``` TypeScript\nclass TodoView extends Backbone.View\u003cTodoModel> {\n    initialize() {\n        this.listenTo(this.model, 'change', () => this.render());\n        this.listenTo(this.model, 'todoDescriptionChanged', () => this.render());\n        this.listenTo(this.model, 'destory', () => this.remove());\n    }\n```\n\nAt another point I may attempt to manually trigger one of these events:\n\n``` ts\n    updateTodo() {\n        var desc = this.$input.val().trim();\n        var todo = this.model;\n        if (desc) {\n            todo.save({ title: desc });\n            // provide completion list inside this string literal showing \n            // todoDescriptionChanged to avoid hard to debug typos \n            // and speed up development\n            todo.trigger('todoDescriptionChanged'); \n        }\n     }\n```\n\nThis should be a relatively cheap solution to a common set of problems that we've always hoped TypeScript can improve on over JavaScript. If you did accidentally make a typo in one use of the literal this could also help you discover that when seeing 2 completion list items that are similar but slightly different.\n","author":{"url":"https://github.com/danquirk","@type":"Person","name":"danquirk"},"datePublished":"2014-09-05T00:55:40Z","url":"https://github.com/microsoft/TypeScript/issues/606"}

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:51e7d4b7-4946-cec1-0857-d152a0ab5197
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE664:2B909E:4260A7:59435B:6AFBEC64
html-safe-nonceebb9e50267f02c95d372162df9affa804eef38e81c5d8c98fb09fcaffb89a3fc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjY0OjJCOTA5RTo0MjYwQTc6NTk0MzVCOjZBRkJFQzY0IiwidmlzaXRvcl9pZCI6IjY4MzY0MzAyNTQzNjIwNjE5MjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacb3769adba3409f628e0f3a05154d021887f2e9139062809565673725b2bf2c47
hovercard-subject-tagissue:42002903
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/606/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a46a9625e80ada3d57d30952e013a3b52ee86879c36231fc393151bb10f4f76f/microsoft/TypeScript/issues/606
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a46a9625e80ada3d57d30952e013a3b52ee86879c36231fc393151bb10f4f76f/microsoft/TypeScript/issues/606
og:image:altMany JavaScript frameworks are heavily based on using string values to do many things, from getting and setting attributes via the property name in string form, to defining event handlers to handle...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedanquirk
hostnamegithub.com
expected-hostnamegithub.com
None744d4381b1c4dbd6d8736c7d7e5bbe7dc11217584e457a3555020c631764e8ec
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
releasedf859c48a4c8b4c0009c19bb4e82101aacb4b998
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/606#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F606
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%2F606
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/606
Reloadhttps://github.com/microsoft/TypeScript/issues/606
Reloadhttps://github.com/microsoft/TypeScript/issues/606
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests335 (335)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/pulse
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/606
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/606
Provide completion lists for string literalshttps://github.com/microsoft/TypeScript/issues/606#top
Domain: Literal TypesUnit types including string literal types, numeric literal types, Boolean literals, null, undefinedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20Literal%20Types%22
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
Visual StudioIntegration with Visual Studiohttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Visual%20Studio%22
TypeScript 2.0https://github.com/microsoft/TypeScript/milestone/1
https://github.com/danquirk
Dan Quirk (danquirk)https://github.com/danquirk
on Sep 5, 2014https://github.com/microsoft/TypeScript/issues/606#issue-42002903
Dan Quirk (danquirk)https://github.com/danquirk
Suggestionhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
on Sep 5, 2014https://github.com/microsoft/TypeScript/issues/606#event-161522530
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Sep 5, 2014https://github.com/microsoft/TypeScript/issues/606#issuecomment-54573783
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Sep 5, 2014https://github.com/microsoft/TypeScript/issues/606#issuecomment-54656925
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Sep 5, 2014https://github.com/microsoft/TypeScript/issues/606#issuecomment-54658426
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Sep 5, 2014https://github.com/microsoft/TypeScript/issues/606#issuecomment-54669628
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Sep 5, 2014https://github.com/microsoft/TypeScript/issues/606#issuecomment-54674502
https://github.com/danquirk
Dan Quirk (danquirk)https://github.com/danquirk
on Sep 5, 2014https://github.com/microsoft/TypeScript/issues/606#issuecomment-54674616
https://github.com/jbondc
Jon (jbondc)https://github.com/jbondc
on Sep 25, 2015https://github.com/microsoft/TypeScript/issues/606#issuecomment-143290638
https://cloud.githubusercontent.com/assets/199519/10107114/ca442adc-6386-11e5-9366-823e93d109d2.png
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Nov 11, 2015https://github.com/microsoft/TypeScript/issues/606#issuecomment-155694823
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
Domain: Literal TypesUnit types including string literal types, numeric literal types, Boolean literals, null, undefinedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20Literal%20Types%22
on Mar 9, 2016https://github.com/microsoft/TypeScript/issues/606#event-582929009
https://github.com/mrcrowl
mrcrowlhttps://github.com/mrcrowl
on Mar 9, 2016https://github.com/microsoft/TypeScript/issues/606#issuecomment-194520697
https://github.com/NoelAbrahams
Noel Abrahams (NoelAbrahams)https://github.com/NoelAbrahams
on Apr 15, 2016https://github.com/microsoft/TypeScript/issues/606#issuecomment-210387079
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#8125https://github.com/microsoft/TypeScript/pull/8125
on Apr 18, 2016https://github.com/microsoft/TypeScript/issues/606#event-631668644
https://github.com/danquirk
Dan Quirk (danquirk)https://github.com/danquirk
on Apr 18, 2016https://github.com/microsoft/TypeScript/issues/606#issuecomment-211520991
Daniel Rosenwasser (@DanielRosenwasser)https://github.com/DanielRosenwasser
#8125https://github.com/microsoft/TypeScript/pull/8125
Jon (@jbondc)https://github.com/jbondc
#606 (comment)https://github.com/microsoft/TypeScript/issues/606#issuecomment-143290638
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Apr 27, 2016https://github.com/microsoft/TypeScript/issues/606#event-642346902
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Apr 27, 2016https://github.com/microsoft/TypeScript/issues/606#issuecomment-214952591
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#8428https://github.com/microsoft/TypeScript/pull/8428
on Jun 8, 2016https://github.com/microsoft/TypeScript/issues/606#event-686497388
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
on Jun 8, 2016https://github.com/microsoft/TypeScript/issues/606#event-686497717
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
TypeScript 2.0https://github.com/microsoft/TypeScript/milestone/1
on Jun 8, 2016https://github.com/microsoft/TypeScript/issues/606#event-686497756
https://github.com/danquirk
Dan Quirk (danquirk)https://github.com/danquirk
on Jun 9, 2016https://github.com/microsoft/TypeScript/issues/606#issuecomment-225017004
Mohamed Hegazy (@mhegazy)https://github.com/mhegazy
#8428https://github.com/microsoft/TypeScript/pull/8428
microsofthttps://github.com/microsoft
on Jun 18, 2018https://github.com/microsoft/TypeScript/issues/606#event-1686906835
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/606
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/606
Domain: Literal TypesUnit types including string literal types, numeric literal types, Boolean literals, null, undefinedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20Literal%20Types%22
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
Visual StudioIntegration with Visual Studiohttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Visual%20Studio%22
TypeScript 2.0https://github.com/microsoft/TypeScript/milestone/1
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.