René's URL Explorer Experiment


Title: Design Meeting Notes for 2/05/2016 · Issue #6930 · microsoft/TypeScript · GitHub

Open Graph Title: Design Meeting Notes for 2/05/2016 · Issue #6930 · microsoft/TypeScript

X Title: Design Meeting Notes for 2/05/2016 · Issue #6930 · microsoft/TypeScript

Description: Joke of the day Anders: "What do you call a fish without an eye?" "Fsh!" Breaking Changes "use strict" changes for modules (#3676) Requested by several people. Broke several people. New flag Yay, new flags! Today's flag is... emitNonStri...

Open Graph Description: Joke of the day Anders: "What do you call a fish without an eye?" "Fsh!" Breaking Changes "use strict" changes for modules (#3676) Requested by several people. Broke several people. New flag Yay, n...

X Description: Joke of the day Anders: "What do you call a fish without an eye?" "Fsh!" Breaking Changes "use strict" changes for modules (#3676) Requested by several people. Broke s...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design Meeting Notes for 2/05/2016","articleBody":"# Joke of the day\n- Anders: \"What do you call a fish without an eye?\"\n  - \"Fsh!\"\n# Breaking Changes\n## \"use strict\" changes for modules (#3676)\n- Requested by several people.\n- Broke several people.\n- New flag\n- Yay, new flags!\n- Today's flag is...\n  - `emitNonStrictModules`.\n  - Keeps compliance, but allows people to revert behavior.\n  - Do we emit `\"use strict\"` for classes?\n    - No.\n    - We should.\n    - Should this flag affect that when we make that change?\n      - Yes, let's give the flag a better name to reflect that.\n    - Would we be breaking people if we actually did this though?\n      - Apparently yes.\n## Defaulting to built-in promises\n- We used to use type annotations as a guide to enable a bring-your-own-promise scenario.\n  - Doesn't match with semantics reflecting original spec.\n  - Breaks design goals.\n- Could we remove the restriction for ES6 (ES7?) and prior?\n  - Sure?\n- Options:\n  - Keep breaking change\n  - Undo the change, perform the breaking change when we actually have downlevel `async`/`await`.\n- Resolution: undo the change, apply it when we actually allow users to downlevel their `async` code.\n# Features (and potential breaking changes)\n## Specifying `this` types for functions (#6739)\n- What does the \"strict `this`\" world look like?\n- We will check `this` just as if it was an argument today.\n- Consider\n  \n  ``` ts\n  class Foo {\n      m() {\n          this.blah();\n          // ...\n      }\n  \n      blah() {\n          // ...\n      }\n  }\n  \n  let foo: Foo;\n  let e: () => void = foo.m;\n  e();\n  ```\n  - That example will crash because `m` has been orphaned from its `Foo` instance.\n- Strict `this`-checking aims to fix this issue.\n- `this` appears in the parameter list for functions and function types.\n- `this` types affect assignability of signatures:\n  \n  ``` ts\n  type EventA = (this: Element, x: string) => void;\n  \n  type EventB = (this: void, x: string) => void;\n  \n  let a: EventA;\n  let b: EventB;\n  \n  a = b; // Error: 'void' isn't enough for a method needing an 'Element' for 'this'.\n  b = a; // Okay: No problem with getting *more* than you expect.\n  ```\n  - Assignability is still bivariant for a `this` parameter\n- In strict-`this` mode, the following's an error:\n  \n  ``` ts\n  function foo(s: string) {\n      this.abc; // Error: 'this' is implicitly a 'void'.\n  }\n  ```\n- Arrow functions will _always_ hold the value of `this` from their containing scope.\n- Free-standing functions implicitly get a `void` type for `this`.\n- Methods in classes implicitly have a `this` type of `this`.\n  - Hopefully this is not very surprising.\n  - This prevents incorrectly \"ripping off the method\" (`this` orphaning) from the first example.\n- Static methods have a `this` type of `typeof Foo` where `Foo` is the containing class. \n- Does this fix the `bind` function?\n  - Almost!!\n- Why do we need a flag?\n  - It breaks existing code for when your methods have no dependency on `this`.\n  - Occurs several types in the compiler.\n  - Problems sprout up between methods signatures and function type literals:\n    \n    ``` ts\n    interface Foo {\n        a(): void;\n        b(): void;\n    }\n    \n    interface Bar {\n        a: () => void;\n        b: () => void;\n    }\n    ```\n    - `Foo` methods implicitly get a `this: this` type, while `Bar` methods get a `this: void` type!\n    - We need to be prescriptive and explain to people how to write definitions.\n    - People are still going to run into such gotchas.\n- By default, without the strict-`this` flag, there will be no implied `this` type.\n- But we still want contextual typing to work correctly:\n  \n  ``` ts\n  addOnClick(function (e) {\n      // 'this' has the 'Element' type.\n      this./*|*/\n      //     |\n      //     +-- Members of the 'Element' type.\n  });\n  ```\n- What about object literals?\n  - If the object is contextually typed by `X`, methods will get the `this` type of `X`.\n    \n    ``` ts\n    var o: X = {\n        x: 10,\n        m() {\n            this // has type 'X'\n        }\n    }\n    ```\n  - An object literal with no contextual type just grabs the type of the object literal:\n    \n    ``` ts\n    var o: X = {\n        x: 10,\n        m() {\n            this // has type '{ x: number; m(this: /*typeof o?*/); }}'\n        }\n    }\n    ```\n    - Uh-oh, how will the declaration emitter and language-service print the type of `o`?\n- Speaking of surfacing the representation of these types...\n  \n  ``` ts\n  interface Foo {\n      bar();\n  }\n  // What is the type of 'foo'? (this: this) => void?\n  const foo = foo.bar;\n  ```\n- So are all these very big changes going to need these sorts of flags?\n  - Are we going to have a \"very strict mode\"?\n- Do overload `this` parameters need to match?\n  - No.\n## Unique types/tagged types/opaque types\n- People keep asking for this.\n- Ideas from last time:\n  \n  ``` ts\n  unique class C {\n      // ...\n  }\n  \n  unique interface I {\n      // ...\n  }\n  \n  unique type Path = string;\n  ```\n- The biggest question last time was what the behavior was for the type alias example (i.e. `Path`).\n- We're thinking that\n  \n  ``` ts\n  type Path = string & (unique {});\n  ```\n  - We can also do some stuff so that `Path` will be printed as `Path`.\n- This approach, combined with intersections, allows you to \"compose\" on existing types.\n- You can write `Path & Lowercased`.\n- Unique interfaces are useful for preventing people from forging nodes.\n- What about if a base is unique?\n- Does `unique` affect the static side?\n  - Maybe?\n  - Actually, you get that for free because the constructor function returns a unique type.\n  - Well almost. But that would require a type assertion anyhow.\n","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2016-02-05T20:32:05Z","url":"https://github.com/microsoft/TypeScript/issues/6930"}

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:7c6000a3-57f4-b95c-875d-d5c4acf2fea4
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD9C0:2D96F1:586898:77ADAB:6B00D087
html-safe-nonce921f997c8894cf2bc61bde79fa7744b2df7b78b385ed997327835a409fa62389
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOUMwOjJEOTZGMTo1ODY4OTg6NzdBREFCOjZCMDBEMDg3IiwidmlzaXRvcl9pZCI6IjM1Mzk2MzgwNDU0MjQ3OTk4NzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacb885ebbbac1c0308e90c3809943c80fdb24da537cb47440347c036dad6e38c59
hovercard-subject-tagissue:131748591
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/6930/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3c2177c5ff996d0da49fc429c7d85252d1e99bccda769e3bde54a347b50d0091/microsoft/TypeScript/issues/6930
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3c2177c5ff996d0da49fc429c7d85252d1e99bccda769e3bde54a347b50d0091/microsoft/TypeScript/issues/6930
og:image:altJoke of the day Anders: "What do you call a fish without an eye?" "Fsh!" Breaking Changes "use strict" changes for modules (#3676) Requested by several people. Broke several people. New flag Yay, n...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameDanielRosenwasser
hostnamegithub.com
expected-hostnamegithub.com
None85bbdfe2b6ba16e234513bc6ceff5d848ef8449820c900692a2b4e67061931e5
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
release4943239a6d2c591325dad6e5c313e1cafda877f6
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/6930#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F6930
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%2F6930
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/6930
Reloadhttps://github.com/microsoft/TypeScript/issues/6930
Reloadhttps://github.com/microsoft/TypeScript/issues/6930
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests307 (307)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/6930
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/6930
Design Meeting Notes for 2/05/2016https://github.com/microsoft/TypeScript/issues/6930#top
Design NotesNotes from our design meetingshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Notes%22
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Feb 5, 2016https://github.com/microsoft/TypeScript/issues/6930#issue-131748591
#3676https://github.com/microsoft/TypeScript/issues/3676
#6739https://github.com/microsoft/TypeScript/pull/6739
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
Design NotesNotes from our design meetingshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Notes%22
on Feb 5, 2016https://github.com/microsoft/TypeScript/issues/6930#event-541178823
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Feb 5, 2016https://github.com/microsoft/TypeScript/issues/6930#event-541178860
microsofthttps://github.com/microsoft
on Jun 19, 2018https://github.com/microsoft/TypeScript/issues/6930#event-1689637582
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/6930
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/6930
Design NotesNotes from our design meetingshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Notes%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.