Title: Design Meeting Notes for 11/13/2015 · Issue #5657 · microsoft/TypeScript · GitHub
Open Graph Title: Design Meeting Notes for 11/13/2015 · Issue #5657 · microsoft/TypeScript
X Title: Design Meeting Notes for 11/13/2015 · Issue #5657 · microsoft/TypeScript
Description: Acquiring Typings as Packages (#5537, typings/discussions#3) This is fairly important given that getting typings is a big pain point for customers. Blake has an implementation of a typings registry. What is the workflow between Typings' ...
Open Graph Description: Acquiring Typings as Packages (#5537, typings/discussions#3) This is fairly important given that getting typings is a big pain point for customers. Blake has an implementation of a typings registry...
X Description: Acquiring Typings as Packages (#5537, typings/discussions#3) This is fairly important given that getting typings is a big pain point for customers. Blake has an implementation of a typings registry...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/5657
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design Meeting Notes for 11/13/2015","articleBody":"## Acquiring Typings as Packages (#5537, https://github.com/typings/meta/issues/3)\n- This is fairly important given that getting typings is a big pain point for customers.\n- Blake has an implementation of a typings registry.\n- What is the workflow between Typings' registry and npm?\n - Considering distributing typings as npm packages.\n - SystemJS and AMD introduce certain complications.\n- How does this system figure out the conflicting versioning problem?\n - npm does much of the hard work here with deduplication.\n - Package scopes would help alleviate pain points.\n- Lots of open questions - things are in flux and experimental right now.\n- Hopefully we'll have more information with a proposal by next week.\n## Internal Modifier (#5228)\n- Public within `.ts` files in a single program.\n- If used in a `.d.ts` program, treated as `private`/`protected`\n- `internal` members get type `any` when generating a `.d.ts` file.\n- Makes things work kind of like in C#.\n - Assuming `.d.ts` is an external library.\n- Consumers who subclass cannot access the internal member \n - Subclasses still consistently compatible with their base type.\n- When is this useful?\n - Kind of like every entity within your program is a \"friend\" of internal members. \n - Seems to really boil down to `.d.ts` generation and how users expose portions of their API.\n- What about `protected internal`?\n - No. We're not doing that.\n- What about `internal` for modules/namespaces?\n - Ron wants to take it one step at a time.\n - Things get muddy, so we'd need to experiment.\n- Does this solve real-world problems, both now and if eventually extended to modules/namespaces/interfaces? \n - All uses of `/* @internal */` in Angular's codebase is on class members.\n - Not entirely an issue for modules?\n - One could create a file that re-exports the public portions of your API.\n - Some issues, but could be done.\n - What does it actually mean for modules?\n - Example: internal caches\n - Instances where one wants to extend an API rather than compose.\n - Looks like there is eventual value for modules.\n - An issue for namespaces.\n - We need it within the compiler.\n - Modules seem to be the way forward anyway, so we need to take that into account.\n - Cancellable promise design lends well to motivation.\n - Internal state is... well, `internal`.\n - But implementation needs to modify state.\n- What about interfaces?\n - This can be taken care of by writing two interfaces.\n - Structural typing takes care of the rest.\n - But that stinks for the author of the library.\n - You either write a bunch of wrapper functions or you end up writing a ton of type assertions.\n - We could do something with interfaces.\n - `internal` members within an interface would need to be treated nominally.\n - But it's sort of weird to have interfaces with modifiers now whose declarations are treated nominally.\n - But it's _already_ sort of weird given that an ambient class and an interface can merge today and effectively do the same thing.\n - But could you ever _implement_ an interface with `internal` members from the outside?\n - Is that a good thing?\n - Seems plausibly useful - lets users express certain patterns difficult with structural types. \n - You can create something of some type internally, but never manufacture it from the outside.\n- Introduces notion of a \"compilation [unit]\".\n - What about when a user wants to fake the original compilation unit as part of a different compilation unit.\n - Rename the `.d.ts` to `.ts`?\n- How are we feeling about this so far?\n - We know some partner teams would be very happy with it.\n - Users familiar with OO languages will be happy to have it.\n - Doesn't solve problems within our compiler - we'll have to continue using `--stripInternal`.\n- What about a flag that specifies whether or not a user wants to respect `internal`?\n - Kind of weird - not granular enough.\n - You could accidentally use another library's internal members.\n - Would consumers who use the flag affect _their_ consumers?\n - No.\n - \"Respect `internal`\" consumers don't infect their consumers with the flag.\n- There is a weird dichotomy between `internal` in a `.ts` file and a `.d.ts` file.\n - The modifier means something completely different in each file type.\n- What about users decorators?\n - Modifiers are (kinda-sorta) like \"burnt-in decorators with fixed meaning\".\n - Let users define their own `internal` semantics.\n - We'd need ambient decorators.\n - Also doesn't work on everything.\n - Function declarations can't be decorated.\n - Not necessarily a problem with ambient decorators.\n- Symbols might be another solution to this, but our symbol support in the type system is lacking for these scenarios.\n- What is customer demand?\n - Decent demand, but not fully clear.\n - Definite use cases.\n - We run into it ourselves.\n - Every time customers ask about it, we point them to the \"undocumented\" `--stripInternal` flag.\n- We would prefer a generalized semantics.\n - `--stripInternal` nor `internal` really cover all the use-cases.\n- There's some hesitation to add another modifier.\n - Ambient decorators would work but...\n - Decorators are another cognitive load, just pushed onto the users.\n - What about when users ask about `protected internal`?\n- We're going to need to sit on it and ponder.\n","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2015-11-13T20:30:00Z","url":"https://github.com/microsoft/TypeScript/issues/5657"}
| 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:7f265a64-b5b4-f22d-a662-cb23413cc4dc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C39C:2F9AA4:3984BE:4C3171:6B017112 |
| html-safe-nonce | d1c7c68b3eb864a80bf81ffaac083c2cd598305ad74c6a967f1fd2f165ee7955 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzlDOjJGOUFBNDozOTg0QkU6NEMzMTcxOjZCMDE3MTEyIiwidmlzaXRvcl9pZCI6IjE0MTE0NjgxOTk2MzUwMjIwOTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 60bfef1ba31037e67db5727c222405d0f0ea56986b72903eef54fca585695781 |
| hovercard-subject-tag | issue:116846012 |
| 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/5657/issue_layout |
| twitter:image | https://opengraph.githubassets.com/82c8b62d119eea71800553266f83b07c3059c0797cf547c4033fdf672bf2652d/microsoft/TypeScript/issues/5657 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/82c8b62d119eea71800553266f83b07c3059c0797cf547c4033fdf672bf2652d/microsoft/TypeScript/issues/5657 |
| og:image:alt | Acquiring Typings as Packages (#5537, typings/discussions#3) This is fairly important given that getting typings is a big pain point for customers. Blake has an implementation of a typings registry... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DanielRosenwasser |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width