mscharley/dot

Incorrect synchronicity detected for Container.load(ContainerModule)

Closed this issue · 0 comments

Describe the bug.

When you try to load something typed as a general interfaces.ContainerModule it gets treated like a synchonous module even though it might actually be an asynchronous one.

Steps to reproduce

const module: interfaces.ContainerModule = async () => {};

container.load(module); // this should require an await.

Expected behaviour

Treat generic ContainerModule's as async modules by default as awaiting a synchronous module does nothing.

IOC-Deco

1.2.4

TypeScript

5.2.2

Decorator type

Typescript Experimental

Node

No response

Add any other context about the problem here.

No response