/
githubmirror
/
strapi
Обзор
Документация
Войти
/
githubmirror
/
strapi
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/plugins/documentation/server/src/utils.ts
14 строк
362 B
Alexandre Bodin
chore: migrate doc plugin to ts
21 мар 2024, 20:20
21 мар 2024, 20:20
eedd4c9
Код
Авторство
О чём код?
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, };