René's URL Explorer Experiment


Title: Type-directed emit breaks language design goals. Is it worth it? · Issue #6007 · microsoft/TypeScript · GitHub

Open Graph Title: Type-directed emit breaks language design goals. Is it worth it? · Issue #6007 · microsoft/TypeScript

X Title: Type-directed emit breaks language design goals. Is it worth it? · Issue #6007 · microsoft/TypeScript

Description: Project A: // file: foo-a.ts import BluebirdPromise = require('bluebird'); export async function foo(): BluebirdPromise { } // <== has type annotation // file: foo-a.js function foo() { return __awaiter(this, void 0, BluebirdPromise, fun...

Open Graph Description: Project A: // file: foo-a.ts import BluebirdPromise = require('bluebird'); export async function foo(): BluebirdPromise { } // <== has type annotation // file: foo-a.js function foo() { return __aw...

X Description: Project A: // file: foo-a.ts import BluebirdPromise = require('bluebird'); export async function foo(): BluebirdPromise { } // <== has type annotation // file: foo-a.js function foo() { ...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Type-directed emit breaks language design goals. Is it worth it?","articleBody":"#### Project A:\n\n``` typescript\n// file: foo-a.ts\nimport BluebirdPromise = require('bluebird');\nexport async function foo(): BluebirdPromise { }  //  \u003c== has type annotation\n\n// file: foo-a.js\nfunction foo() {\n    return __awaiter(this, void 0, BluebirdPromise, function* () { });\n}\nexports.foo = foo;\n\n```\n#### Project B:\n\n``` typescript\n// file: foo-b.ts\nimport BluebirdPromise = require('bluebird');\nexport async function foo() { }                   //  \u003c== no type annotation\n\n// file: foo-b.js\nfunction foo() {\n    return __awaiter(this, void 0, Promise, function* () { });\n}\nexports.foo = foo;\n```\n\nThese two projects differ only by a single type annotation, but they produce different JavaScript code with different runtime behaviour.\n\n(Compiled with v1.7.3 with `target=ES6, module=commonjs, noEmitHelpers=true`).\n\n(Note elison bug #6003 is also visible here but not the subject of this issue.)\n#### Bug or by design?\n\nI understand this is [by design](https://github.com/Microsoft/TypeScript/issues/5911#issuecomment-161736662) (sorry I can't find a better ref).\n\nHowever I strongly feel this should be considered a bug, because having a _\"fully erasable, structural type system\"_ is a core design principle of TypeScript (quote is from the [design goals page](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals#goals)).\n\nIf this is tagged as 'by design', could we please get some sort of statement from the team to clarify where TypeScript now stands on the \"fully erasable type system\" goal and the _\"[don't] emit different code based on the results of the type system\"_ non-goal?\n","author":{"url":"https://github.com/yortus","@type":"Person","name":"yortus"},"datePublished":"2015-12-09T03:30:46Z","url":"https://github.com/microsoft/TypeScript/issues/6007"}

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:5d77d255-b9ff-1630-2b91-6bfcd3dba0f4
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCADC:91CF4:7E0A4B:A8F722:6B00DB29
html-safe-nonce81e25f92e8d339df8d77b361359e1e37161c29804e426e7fe4e01c8b589a5285
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQURDOjkxQ0Y0OjdFMEE0QjpBOEY3MjI6NkIwMERCMjkiLCJ2aXNpdG9yX2lkIjoiNTEwMDgzNzM3MTY2Mjg4MzYyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac9cffaaa07fbf6920963e70f168f95e51c23008fe3018c03222a95d62954a8797
hovercard-subject-tagissue:121152242
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/6007/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7652d6ae43e7d584ea49cbf481279a3e24824806fa9c4d2f02b8e52ce4213ded/microsoft/TypeScript/issues/6007
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7652d6ae43e7d584ea49cbf481279a3e24824806fa9c4d2f02b8e52ce4213ded/microsoft/TypeScript/issues/6007
og:image:altProject A: // file: foo-a.ts import BluebirdPromise = require('bluebird'); export async function foo(): BluebirdPromise { } // <== has type annotation // file: foo-a.js function foo() { return __aw...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameyortus
hostnamegithub.com
expected-hostnamegithub.com
Nonea481f62a1e04c9b9bdcb5628230682c66d59006f5b13b080f79cba84a176905b
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
release84c8c5cc25e2fb7f2308428458538436baecc6d2
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/6007#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F6007
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%2F6007
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/6007
Reloadhttps://github.com/microsoft/TypeScript/issues/6007
Reloadhttps://github.com/microsoft/TypeScript/issues/6007
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests308 (308)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/6007
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/6007
Type-directed emit breaks language design goals. Is it worth it?https://github.com/microsoft/TypeScript/issues/6007#top
DiscussionIssues which may not have code impacthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Discussion%22
https://github.com/yortus
Troy Gerwien (yortus)https://github.com/yortus
on Dec 9, 2015https://github.com/microsoft/TypeScript/issues/6007#issue-121152242
#6003https://github.com/microsoft/TypeScript/issues/6003
by designhttps://github.com/Microsoft/TypeScript/issues/5911#issuecomment-161736662
design goals pagehttps://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals#goals
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
DiscussionIssues which may not have code impacthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Discussion%22
on Dec 9, 2015https://github.com/microsoft/TypeScript/issues/6007#event-486464406
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Dec 9, 2015https://github.com/microsoft/TypeScript/issues/6007#issuecomment-163107459
Mohamed Hegazy (@mhegazy)https://github.com/mhegazy
Ron Buckton (@rbuckton)https://github.com/rbuckton
https://github.com/yortus
Troy Gerwien (yortus)https://github.com/yortus
on Dec 9, 2015https://github.com/microsoft/TypeScript/issues/6007#issuecomment-163134013
#6068 (comment)https://github.com/microsoft/TypeScript/issues/6068#issuecomment-164150923
herehttps://gist.github.com/yortus/9df1ca6078639eb63eff
https://github.com/yortus
Troy Gerwien (yortus)https://github.com/yortus
on Dec 10, 2015https://github.com/microsoft/TypeScript/issues/6007#issuecomment-163460854
#6027https://github.com/microsoft/TypeScript/issues/6027
https://github.com/yortus
Troy Gerwien (yortus)https://github.com/yortus
on Dec 24, 2015https://github.com/microsoft/TypeScript/issues/6007#issuecomment-167017064
#6068https://github.com/microsoft/TypeScript/issues/6068
https://github.com/yortus
Troy Gerwien (yortus)https://github.com/yortus
on Jan 29, 2016https://github.com/microsoft/TypeScript/issues/6007#issuecomment-176554989
Ron Buckton (@rbuckton)https://github.com/rbuckton
#6631https://github.com/microsoft/TypeScript/pull/6631
slated for v2.0https://github.com/Microsoft/TypeScript/wiki/Roadmap/f5faca60dcc846b8353a22abaec123139a86c8a6#20
herehttps://github.com/Microsoft/TypeScript/pull/6631#discussion_r50919498
herehttps://github.com/Microsoft/TypeScript/pull/6631#discussion_r50930093
https://github.com/yortus
Troy Gerwien (yortus)https://github.com/yortus
on Nov 10, 2016https://github.com/microsoft/TypeScript/issues/6007#issuecomment-259645108
just came outhttps://blogs.msdn.microsoft.com/typescript/2016/11/08/typescript-2-1-rc-better-inference-async-functions-and-more/
herehttps://github.com/Microsoft/TypeScript/issues/10844#issuecomment-247829362
herehttps://github.com/Microsoft/TypeScript/issues/10844#issuecomment-247829746
Ryan Cavanaugh (@RyanCavanaugh)https://github.com/RyanCavanaugh
respondedhttps://github.com/Microsoft/TypeScript/issues/10844#issuecomment-248064330
how to use async/await is ES3/5 environmentshttps://blogs.msdn.microsoft.com/typescript/2016/11/08/typescript-2-1-rc-better-inference-async-functions-and-more/#user-content-downlevel-async-functions
herehttps://github.com/Microsoft/TypeScript/issues/6686#issuecomment-176758649
herehttps://github.com/Microsoft/TypeScript/issues/10844#issuecomment-247829746
Troy Gerwien (yortus)https://github.com/yortus
on Nov 11, 2016https://github.com/microsoft/TypeScript/issues/6007#event-855377632
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Jul 21, 2020https://github.com/microsoft/TypeScript/issues/6007#issuecomment-662140901
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jul 21, 2020https://github.com/microsoft/TypeScript/issues/6007#event-3573379796
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/6007
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/6007
DiscussionIssues which may not have code impacthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Discussion%22
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.