@domain.js/main 0.4.5 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -21,7 +21,7 @@ export declare function Main(cnf: Cnf, deps: Deps): Readonly<{
|
|
|
21
21
|
auto: <F extends (...args: any[]) => any>(fn: F, schema: Schema[], errorFn: Function, extra: any) => (...args: Parameters<F>) => ReturnType<F>;
|
|
22
22
|
validate: (schema: Schema, data: any) => boolean;
|
|
23
23
|
compile: (schema: Schema) => ajv.ValidateFunction<unknown>;
|
|
24
|
-
/**
|
|
24
|
+
/** instance of Ajv */
|
|
25
25
|
ajv: import("ajv").default;
|
|
26
26
|
}>;
|
|
27
27
|
export declare const Deps: string[];
|
package/dist/http/socket.js
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** 将 readonly string[] 转换成联合类型 */
|
|
2
2
|
export declare type ReadonlyArray2union<T extends ReadonlyArray<any>> = T extends ReadonlyArray<infer A> ? A : never;
|
|
3
|
+
declare type Type = "string" | "number" | "integer" | "object" | "array" | "boolean";
|
|
3
4
|
/** 接口参数 schema 定义的类型 */
|
|
4
5
|
export interface ParamsSchema<Params extends {}, Keys extends string | number | symbol = keyof Params> {
|
|
5
6
|
/** 接口整体描述信息 */
|
|
@@ -17,6 +18,7 @@ export interface ParamsSchema<Params extends {}, Keys extends string | number |
|
|
|
17
18
|
/** 当前参数的描述信息 */
|
|
18
19
|
description: string;
|
|
19
20
|
/** 当前参数的类型 */
|
|
20
|
-
type:
|
|
21
|
+
type: Type | [Type];
|
|
21
22
|
}>;
|
|
22
23
|
}
|
|
24
|
+
export {};
|