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
I've been trying to create my own decorators, but don't really have any luck atm.
In angular you can do something like this:
interface ModuleDecorator { (module: Module): Module new (module: Module): Module } interface Module { providers: Provider[] } const Module = <ModuleDecorator>makeDecorator('Module', (module: Module) => module);
However when doing this with the makeDecorator provided by injection-js the properties are not set to the decorator.
After a quick search I found out this sorta works
const Module = <ModuleDecorator>makeDecorator('Module', ['module']);
However that creates the following
DecoratorFactory { module: { providers: [] } }
Instead, I want the following:
DecoratorFactory { providers: [] }
The text was updated successfully, but these errors were encountered:
You can read more about TypeScript decorators here https://www.typescriptlang.org/docs/handbook/decorators.html.
makeDecorator is not a public function of this library.
makeDecorator
Sorry, something went wrong.
No branches or pull requests
I've been trying to create my own decorators, but don't really have any luck atm.
In angular you can do something like this:
However when doing this with the makeDecorator provided by injection-js the properties are not set to the decorator.
After a quick search I found out this sorta works
However that creates the following
Instead, I want the following:
The text was updated successfully, but these errors were encountered: