@deessejs/collections 0.0.5 → 0.0.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.
- package/dist/fields/field.d.ts +1 -1
- package/dist/fields/types.d.ts +2 -2
- package/package.json +1 -1
package/dist/fields/field.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
2
|
import { Field, FieldConfig, FieldTypeConfig, FieldTypeFinal } from "./types";
|
|
3
3
|
export declare const fieldType: <TParams extends z.ZodType>(config: FieldTypeConfig<TParams>) => (params: z.infer<TParams>) => FieldTypeFinal<TParams>;
|
|
4
|
-
export declare const field: <TType extends
|
|
4
|
+
export declare const field: <TType extends FieldTypeFinal>(config: FieldConfig<TType>) => Field<TType>;
|
package/dist/fields/types.d.ts
CHANGED
|
@@ -26,11 +26,11 @@ export type FieldPermissions = {
|
|
|
26
26
|
update: (ctx: any) => Promise<boolean>;
|
|
27
27
|
delete: (ctx: any) => Promise<boolean>;
|
|
28
28
|
};
|
|
29
|
-
export type FieldConfig<TType extends
|
|
29
|
+
export type FieldConfig<TType extends FieldTypeFinal> = {
|
|
30
30
|
type: TType;
|
|
31
31
|
permissions?: Partial<FieldPermissions>;
|
|
32
32
|
};
|
|
33
|
-
export type Field<TType extends
|
|
33
|
+
export type Field<TType extends FieldTypeFinal = FieldTypeFinal> = {
|
|
34
34
|
type: TType;
|
|
35
35
|
permissions: FieldPermissions;
|
|
36
36
|
};
|