Title: Allow out-of-order dependencies registration · Issue #2 · Coder-Spirit/lambda-ioc · GitHub
Open Graph Title: Allow out-of-order dependencies registration · Issue #2 · Coder-Spirit/lambda-ioc
X Title: Allow out-of-order dependencies registration · Issue #2 · Coder-Spirit/lambda-ioc
Description: Problem description: Right now, it's only possible to register dependencies in order. This helps achieving type safety, but it's not strictly necessary. Proposed solution: We could "save" type information in some sort of "associated type...
Open Graph Description: Problem description: Right now, it's only possible to register dependencies in order. This helps achieving type safety, but it's not strictly necessary. Proposed solution: We could "save" type info...
X Description: Problem description: Right now, it's only possible to register dependencies in order. This helps achieving type safety, but it's not strictly necessary. Proposed solution: We could "sa...
Opengraph URL: https://github.com/Coder-Spirit/lambda-ioc/issues/2
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Allow out-of-order dependencies registration","articleBody":"## Problem description:\r\n\r\nRight now, it's only possible to register dependencies in order. This helps achieving type safety, but it's not strictly necessary.\r\n\r\n## Proposed solution:\r\n\r\n1. We could \"save\" type information in some sort of \"associated type\" when we register new factories with unmet dependencies (without changing the type of its resolvers, to avoid exposing factories with unmet dependencies).\r\n\r\n2. Later, when we register the dependencies, we could take this type information from the \"associated type\" and use it to \"fix\" the getters' type, to expose the factories that were hidden before.\r\n\r\n## Final considerations\r\n\r\nThis might prove to be difficult, not because of the feasibility of designing the types, but because they might end up being too complex for the TSC type cheker.\r\n","author":{"url":"https://github.com/castarco","@type":"Person","name":"castarco"},"datePublished":"2022-02-02T23:41:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2/lambda-ioc/issues/2"}
| 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:38620dc7-903d-7c18-5162-66f409fe129e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DA78:60C12:743CCC:9EAA6C:6A6185AD |
| html-safe-nonce | ca7b2f1e2289f1087bb4ab1e4b2ffdfab3cb9b3c5e7ec8ea186cf08215b2569f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQTc4OjYwQzEyOjc0M0NDQzo5RUFBNkM6NkE2MTg1QUQiLCJ2aXNpdG9yX2lkIjoiNDkxNzY2MjU4NzA1MDYyNDQyOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4fed0167051d5b1a5745d1756df70fb7decb84f1f822d9d189f9400958dd99be |
| hovercard-subject-tag | issue:1122499468 |
| 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/Coder-Spirit/lambda-ioc/2/issue_layout |
| twitter:image | https://opengraph.githubassets.com/306923ad362712ad7489348c378c1be6da23e1abde0e5d284acb1d764ed2cdab/Coder-Spirit/lambda-ioc/issues/2 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/306923ad362712ad7489348c378c1be6da23e1abde0e5d284acb1d764ed2cdab/Coder-Spirit/lambda-ioc/issues/2 |
| og:image:alt | Problem description: Right now, it's only possible to register dependencies in order. This helps achieving type safety, but it's not strictly necessary. Proposed solution: We could "save" type info... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | castarco |
| hostname | github.com |
| expected-hostname | github.com |
| None | c28c2f6607f2aacbd934868d997038895c9780d08babfe918550d73773326f4c |
| turbo-cache-control | no-preview |
| go-import | github.com/Coder-Spirit/lambda-ioc git https://github.com/Coder-Spirit/lambda-ioc.git |
| octolytics-dimension-user_id | 59818922 |
| octolytics-dimension-user_login | Coder-Spirit |
| octolytics-dimension-repository_id | 454153595 |
| octolytics-dimension-repository_nwo | Coder-Spirit/lambda-ioc |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 454153595 |
| octolytics-dimension-repository_network_root_nwo | Coder-Spirit/lambda-ioc |
| 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 | cd05235d52ffb3318513d883a56c87a121015c8b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width