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

docs: add ts declaration info #346

Closed
wants to merge 2 commits into from
Closed

Conversation

Benzo-Fury
Copy link

No description provided.

README.md Outdated
// awilix.d.ts
import { AwilixContainer } from "awilix";
import { MyServiceA } from "myServiceA.js";
import { MyServiceB } from "myServiceB.js";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why .js?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why .js?

Oops. Sorry

@coveralls
Copy link

coveralls commented Nov 28, 2023

Coverage Status

coverage: 100.0%. remained the same
when pulling fa6153b on Benzo-Fury:master
into 65b2de7 on jeffijoe:master.

@jeffijoe
Copy link
Owner

jeffijoe commented Nov 29, 2023

Hey @Benzo-Fury, thank you for the PR.

I'm not sure if this is something we want to advertise as it might also give a false sense of security. Also, the primary interaction with the library is through dependency injection, where it is completely transparent.

I also don't think we want to encourage overriding built-in library types.

@Benzo-Fury
Copy link
Author

All good, no worries.

I was just looking into ways to type dependency's with Awilix online and couldn't find much. From experimenting I found this to be the easiest option, but I do appreciate your concern!

Thanks anyways 🥰

P.S: Thanks for building Awilix, love the project

@Benzo-Fury Benzo-Fury closed this Nov 30, 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 this pull request may close these issues.

3 participants