Replies: 1 comment
-
Hey @bakura10, TypeScript is "transpiled" to JavaScript, which is untyped, therefore it lacks the type information at runtime. The transpiled class from your example will look something like: class Foo {
constructor(manager) {
console.log(manager);
}
} Therefore the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi :),
Sorry if this is a stupid question, but I am not understanding why I need to use an @Inject here. I am registering a MikroORM instance:
Where Foo is:
If I add @Inject(MikroORM) this works, but I fail to understand why. Isn't the container supposed to automatically resolve this as this is a class name ?
I'm coming from PHP background, so I still need to adjust my way to Typescript, but I spent a few hours failing to understand why it is not working here.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions