fivem-ts

a library to speed up the development of Fivem scripts and frameworks


Project maintained by Purpose-Dev Hosted on GitHub Pages — Theme by mattgraham

fivem-ts - Documentation v0.7.5Docs


fivem-ts - Documentation v0.7.5 / Server / container

Variable: container

const container: DIContainer

The default instance of the DIContainer that can be used directly.

This instance is used to register and resolve dependencies globally.

Example

container.registerSingleton(MyService);
const myService = container.resolve(MyService);

Defined in

server/ioc/DIContainer.ts:322