/
ton-org
/
blueprint
Обзор
Документация
Войти
/
ton-org
/
blueprint
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
develop
src/config/utils.ts
22 строки
534 B
PixelPlex Dev team
feat: separate compilables (#118)
02 июл 2024, 14:10
Не верифицирован
02 июл 2024, 14:10
31fdb57
Код
Авторство
О чём код?
import { Config } from './Config'; import { BLUEPRINT_CONFIG } from '../paths'; let config: Config | undefined; export async function getConfig(): Promise<Config | undefined> { if (config) { return config; } try { const configModule = await import(BLUEPRINT_CONFIG); if (!('config' in configModule) || typeof configModule.config !== 'object') { return undefined; } config = configModule.config; return config; } catch { return undefined; } }