Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial implementation of @LazyInject() #135

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

guyca
Copy link
Collaborator

@guyca guyca commented Mar 21, 2024

This PR introduces a @LazyInject decorator. The standard @Inject decorator resolves dependencies on class creation. The @LazyInject decorator resolves dependencies only when they are used for the first time.

TODO

  • Implement @LazyInject
  • Implement a new API to register graphs lazily:
    Obsidian.registerGraphs(graphs: Record<string, () => ObjectGraph>);
  • Support passing an injection token to the @Injectable() decorator.
  • Support passing an injection token to the subgraphs array property of the @Graph decorator.

@guyca guyca marked this pull request as draft June 28, 2024 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant