-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
73 lines (61 loc) · 1.82 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Typings package from @loli-services/core
declare module '@loli-services/core' {
import express from 'express';
import { Hideri } from '@maika.xyz/hideri';
/**
* The version of `@loli-services/core`
*/
export const version: string;
/**
* Create a new instance of the Loli server class.
* @param options The options to set
* @returns The loli server instance
*/
export function create(options: LoliServerOptions): LoliServer;
/** The main of the core; the server. */
export class LoliServer {
constructor(options: LoliServerOptions);
public app: express.Application;
public database: Database;
public options: LoliServerOptions;
public logger: Hideri.Logger;
public start(): void;
public startRouters(): this;
public startWebsite(): this;
}
/** The router class */
export class Router implements BaseRouter {
constructor(route: string);
public route: string;
public router: express.Router;
public run(): void;
public getRouter(): express.Router;
}
/** The database */
export class Database {
constructor();
public logger: Hideri.Logger;
public connect(): Promise<void>;
}
/**
* The file exception class.
*
* Only use this when a file exception has occured.
*/
export class FileException {
constructor(res: express.Response, req: express.Request);
public build(): express.Response;
}
/** The base router interface */
export interface BaseRouter {
run(): void;
getRouter(): express.Router;
}
/** The options type */
export type LoliServerOptions = {
port: number;
routers: string;
views: string;
static: string;
}
}