/
githubmirror
/
strapi
Обзор
Документация
Войти
/
githubmirror
/
strapi
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/core/data-transfer/src/utils/providers.ts
11 строк
408 B
Alexandre Bodin
chore: remove loadedStrapi and init everything but admin in constructor
03 апр 2024, 15:24
03 апр 2024, 15:24
daf629f
Код
Авторство
О чём код?
import type { Core } from '@strapi/types'; import { ProviderInitializationError } from '../errors/providers'; export type ValidStrapiAssertion = (strapi: unknown, msg?: string) => asserts strapi is Core.Strapi; export const assertValidStrapi: ValidStrapiAssertion = (strapi?: unknown, msg = '') => { if (!strapi) { throw new ProviderInitializationError(`${msg}. Strapi instance not found.`); } };