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

Container Set #61

Open
sgentile opened this issue Apr 30, 2022 · 2 comments
Open

Container Set #61

sgentile opened this issue Apr 30, 2022 · 2 comments
Labels
status: needs triage Issues which needs to be reproduced to be verified report. type: fix Issues describing a broken feature.

Comments

@sgentile
Copy link

I'm setting that container set is not exposed - is there a reason ? Or is there a different approach ? I have a few edge case scenarios where I need to use set.

@sgentile sgentile added status: needs triage Issues which needs to be reproduced to be verified report. type: fix Issues describing a broken feature. labels Apr 30, 2022
@herbola
Copy link

herbola commented May 2, 2022

Use TypeDi's container set method instead:

import { Container, Token } from 'typedi';

const SOME_INJECTION_TOKEN = new Token<any>('some-name');

Container.set(SOME_INJECTION_TOKEN, <some instance>)

@adamalfredsson
Copy link

Use TypeDi's container set method instead:

import { Container, Token } from 'typedi';

const SOME_INJECTION_TOKEN = new Token<any>('some-name');

Container.set(SOME_INJECTION_TOKEN, <some instance>)

But according to documentation you should use the Container exported from typeorm-typedi-extensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage Issues which needs to be reproduced to be verified report. type: fix Issues describing a broken feature.
Development

No branches or pull requests

3 participants