We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@Inject will do dependency injection when user create a new agent class.
e.g
class Calculator { add(left:number, right: number): number { return left + right; } } @agent('awesome') class MyAgent { @inject(Calculator) calculator: Calculator } const agent = new MyAgent(); console.log(agent.calculator.add(1,3)); // 4
The text was updated successfully, but these errors were encountered:
This @Inject decorator already included in the latest release on npm
Sorry, something went wrong.
No branches or pull requests
@Inject will do dependency injection when user create a new agent class.
e.g
The text was updated successfully, but these errors were encountered: