mscharley/dot

Autobindings don't respect the default scope set for a container

Closed this issue · 0 comments

Describe the bug.

If you set a default scope for the container, then auto bindings should respect that default scope.

Steps to reproduce

const container = createContainer({ autobindClasses: true, defaultScope: "singleton" });

@injectable()
class Test {}

expect(container.get(Test)).toBe(container.get(Test));

Expected behaviour

No response

DOT

1.5.1

TypeScript

5.3

Decorator type

Typescript Experimental

Node

20

Add any other context about the problem here.

No response