UNPKG
@hfcjoy/load-config
Version:
latest (1.0.1)
1.0.1
1.0.0
可拓展的支持各种格式配置文件的数据加载
github.com/hfcjoy/load-config
hfcjoy/load-config
@hfcjoy/load-config
/
dist
/
index.d.ts
18 lines
(15 loc)
•
345 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
interface
LoadResult
{
/* file path */
path
?:
string
/* file data */
data
?:
any
}
/** * 加载配置文件数据 * *
@param
name 配置文件名称 *
@param
cwd 执行查询的基础路径 *
@returns
路径以及配置数据 */
declare
function
loadConfig
(
name
:
string
,
cwd
?:
string
):
Promise
<
LoadResult
>;
export
{ loadConfig };