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

Dependencies aren't currently type-checked #32

Open
freshgum-bubbles opened this issue Jul 2, 2023 · 0 comments
Open

Dependencies aren't currently type-checked #32

freshgum-bubbles opened this issue Jul 2, 2023 · 0 comments
Assignees
Milestone

Comments

@freshgum-bubbles
Copy link
Owner

Currently, the parameters of a class aren't type-checked against its dependencies.

Consider the following:

@Service([AnotherService])
export class MyService {
  constructor (private randomValue: number) { }
}

It's a clear error, but it still compiles.
This is because currently, TypeDI does not read the constructor's arguments.
Instead, the arguments are typed as any[].

I believe I've found a workaround for this; a PR can be expected soon.

@freshgum-bubbles freshgum-bubbles self-assigned this Sep 9, 2023
@freshgum-bubbles freshgum-bubbles added this to the Version 1 milestone Dec 16, 2023
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 a pull request may close this issue.

1 participant