mirror of
https://github.com/strapi/strapi.git
synced 2025-07-12 19:41:10 +00:00
15 lines
362 B
TypeScript
15 lines
362 B
TypeScript
import type { Core } from '@strapi/types';
|
|
|
|
import type { Services } from './services';
|
|
|
|
export const getService = <TName extends keyof Services>(
|
|
name: TName,
|
|
{ strapi }: { strapi: Core.Strapi } = { strapi: global.strapi }
|
|
): Services[TName] => {
|
|
return strapi.plugin('documentation').service<Services[TName]>(name);
|
|
};
|
|
|
|
export default {
|
|
getService,
|
|
};
|