type User = {
login: string;
roles: string[];
}
const user: User = {login: 'root', roles: ['admin']}
diSet('user', user)
diDep<User>('user') // {login: 'root', roles: ['admin']}
DiNotInitializedError if called outside of diInit callback
DependencyNotRegisteredError if dependency not registered
Extract overriden function from Dependency Injection
Should be called within diInit callback
const fun = () => 1
diSet(fun, () => 2)
diDep(fun)() // 2
DiNotInitializedError if called outside of diInit callback
Extract value from Dependency Injection by unique string literal
Should be called within diInit callback