20 lines
593 B
TypeScript
Raw Normal View History

2021-06-28 12:34:29 +02:00
import * as role from '../services/role';
import * as user from '../services/user';
import * as permission from '../services/permission';
import * as contentType from '../services/content-type';
import * as metrics from '../services/metrics';
2021-07-28 15:32:21 +02:00
import * as token from '../services/token';
import * as auth from '../services/auth';
2021-06-28 12:34:29 +02:00
type S = {
role: typeof role;
user: typeof user;
permission: typeof permission;
['content-type']: typeof contentType;
2021-07-28 15:32:21 +02:00
token: typeof token;
auth: typeof auth;
2021-06-28 12:34:29 +02:00
metrics: typeof metrics;
};
export function getService<T extends keyof S>(name: T): S[T];