1 |
|
2 |
|
3 |
|
4 | declare namespace FxOrmNS {
|
5 | type IdType = string | number
|
6 | type Arraible<T> = T | T[]
|
7 |
|
8 | interface VoidCallback<T_RESULT = any, T_THIS = any> {
|
9 | (this: T_THIS, err?: FxOrmError.ExtendedError | null): T_RESULT
|
10 | }
|
11 |
|
12 | interface ExecutionCallback<T, T_RESULT = any, T_THIS = any> {
|
13 | (this: T_THIS, err?: string | FxOrmError.ExtendedError | FxOrmError.ExtendedError[] | null, result?: T): T_RESULT
|
14 | }
|
15 |
|
16 | interface GenericCallback<T, T_RESULT = any, T_THIS = any> {
|
17 | (this: T_THIS, err: FxOrmError.ExtendedError | null, result?: T): T_RESULT
|
18 | }
|
19 |
|
20 | interface NextCallback<ERR_T = string, T_RESULT = any, T_THIS = any> {
|
21 | (this: T_THIS, err?: ERR_T): T_RESULT
|
22 | }
|
23 |
|
24 | interface SuccessCallback<T> {
|
25 | (result?: T): any
|
26 | }
|
27 |
|
28 | interface ValidatorCallback {
|
29 | (errors: Error[]): void
|
30 | }
|
31 |
|
32 | type Nilable<T> = null | T
|
33 |
|
34 | interface ExposedResult<T = any> {
|
35 | error: FxOrmError.ExtendedError,
|
36 | result?: T
|
37 | }
|
38 |
|
39 | interface SyncCallbackInputArags<T = any> {
|
40 | callback?: FxOrmNS.ExecutionCallback<T>,
|
41 | is_sync?: boolean
|
42 | }
|
43 |
|
44 | interface ValueWaitor<T = any> {
|
45 | evt?: Class_Event,
|
46 | value: T
|
47 | }
|
48 | } |
\ | No newline at end of file |