Skip to main content
Version: 0.3.1

Creating instances

Once a service and all its dependencies are bound, its possible to create an instance if all the classes involved are properly decorated

import { Container, injectable } from '@cuaklabs/iocuak';

@injectable()
class Dummy {}

const container: Container = Container.build();
container.bind(Dummy);

const dummyInstance: Dummy = container.get(Dummy);