Title: Proposal: String enums · Issue #3192 · microsoft/TypeScript · GitHub
Open Graph Title: Proposal: String enums · Issue #3192 · microsoft/TypeScript
X Title: Proposal: String enums · Issue #3192 · microsoft/TypeScript
Description: A string enum is inferred by looking at the constant value of the initializer of its first member: enum stringsInferred { a = "a", b, // "b" c // "c" } Or it is declared using a string index: enum stringsDeclared { [prop: string] : strin...
Open Graph Description: A string enum is inferred by looking at the constant value of the initializer of its first member: enum stringsInferred { a = "a", b, // "b" c // "c" } Or it is declared using a string index: enum ...
X Description: A string enum is inferred by looking at the constant value of the initializer of its first member: enum stringsInferred { a = "a", b, // "b" c // "c" } Or it is declar...
Mail addresses
notifications@github.com
Opengraph URL: https://github.com/microsoft/TypeScript/issues/3192
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Proposal: String enums","articleBody":"A string enum is inferred by looking at the constant value of the initializer of its first member:\n\n```\nenum stringsInferred {\n a = \"a\",\n b, // \"b\"\n c // \"c\"\n}\n```\n\nOr it is declared using a string index:\n\n```\nenum stringsDeclared {\n [prop: string] : string;\n a, // \"a\"\n B, // \"B\"\n c // \"c\"\n}\n```\n\nThe auto initialized value on an enum is its property name. \n## Inferred enum special case\n\n```\nenum stringsLowerCase {\n Shoes = \"shoes\", // If the first member has lowercase chars, then lowercase all other member values\n Boots, // \"boots\"\n Feet // \"feet\"\n}\n```\n","author":{"url":"https://github.com/jbondc","@type":"Person","name":"jbondc"},"datePublished":"2015-05-17T14:10:36Z","url":"https://github.com/microsoft/TypeScript/issues/3192"}
| 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:abc499d1-9f98-9635-0f49-b890603c5f94 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C640:2C4BED:48B963:5DE8BE:6B00D71D |
| html-safe-nonce | d703cf11e5ee3402524eb3eab6737102abfb9a4e5995656942920afb510bc010 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNjQwOjJDNEJFRDo0OEI5NjM6NURFOEJFOjZCMDBENzFEIiwidmlzaXRvcl9pZCI6IjM5OTQ1NTU2Njg1NDI1NzY0MTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4b0bbdfa85401545015b677220eb5dc0d760eb093c49a6c68d89644de356a6d1 |
| hovercard-subject-tag | issue:77317620 |
| 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/3192/issue_layout |
| twitter:image | https://opengraph.githubassets.com/eba162de47efc9854c98c8d155e3fd9326a958f117c90e8b168682bbd0e5e953/microsoft/TypeScript/issues/3192 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/eba162de47efc9854c98c8d155e3fd9326a958f117c90e8b168682bbd0e5e953/microsoft/TypeScript/issues/3192 |
| og:image:alt | A string enum is inferred by looking at the constant value of the initializer of its first member: enum stringsInferred { a = "a", b, // "b" c // "c" } Or it is declared using a string index: enum ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jbondc |
| hostname | github.com |
| expected-hostname | github.com |
| None | a481f62a1e04c9b9bdcb5628230682c66d59006f5b13b080f79cba84a176905b |
| 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 | 84c8c5cc25e2fb7f2308428458538436baecc6d2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width