-
Notifications
You must be signed in to change notification settings - Fork 0
/
mod.ts
42 lines (37 loc) · 1.33 KB
/
mod.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import Env from './source/utils/envFuns.ts';
import tune from './source/tuner.ts';
import { loadConfig } from './source/tuner.ts';
import { Load } from './source/loaders.ts';
/**
* Основной экспортируемый объект для работы с настройками конфигурации.
*
* @module Tuner
*/
export default {
/**
* Функция для настройки конфигурации.
* @function
* @param {T} cfg - Объект конфигурации.
* @returns {DeepExpand<CombinedConfigType<T>>} Расширенный объект конфигурации.
*/
tune,
/**
* Утилиты для работы с переменными окружения.
* @namespace
*/
Env,
/**
* Загрузчики конфигурации из различных источников.
* @namespace
*/
Load,
use: {
/**
* Загружает и объединяет конфигурации из нескольких источников, указанных в порядке наследования.
* @function
* @param {LoadConfigOptions} [options] - Опции для загрузки конфигурации.
* @returns {Promise<T>} Объединенная и заполненная конфигурация.
*/
loadConfig,
},
};