forked from lonord/reeasy.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
44 lines (40 loc) · 763 Bytes
/
index.d.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
43
44
/*
* Created on Fri Jun 30 2017
*
* Copyright (c) 2017 Loy B. <lonord@qq.com>
*/
interface ReeasyConfig {
/**
* Current work directory, use `process.cwd()` by default
*/
cwd: string
/**
* Is in development mode, default `false`
*/
dev: boolean
/**
* Custom `reeasy.config.js` file path when in format of string;
* Object exported in `reeasy.config.js` file when in format of object
*/
conf: string | object
}
interface ReeasyMiddleware {
/**
* Get middleware instance for koa
*/
koa(): any
}
interface Reeasy {
/**
* Prepare middleware
*/
prepare(): Promise<ReeasyMiddleware>
}
declare module "reeasy" {
/**
* Create Reeasy instance
* @param opts
*/
function create(opts: ReeasyConfig): Reeasy
export = create
}