feathers-utils 1.14.1 → 1.14.2
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.
|
@@ -19,7 +19,7 @@ export declare type InferFindResult<S> = S extends {
|
|
|
19
19
|
} ? Awaited<R> : never;
|
|
20
20
|
export declare type InferCreateResult<S, D = unknown> = S extends {
|
|
21
21
|
create: (data: any, params: any) => infer R;
|
|
22
|
-
} ? D extends
|
|
22
|
+
} ? D extends any[] ? Awaited<AsArray<R>> : D extends InferCreateDataSingle<S> ? Awaited<Single<R>> : Awaited<R> : never;
|
|
23
23
|
export declare type InferCreateResultSingle<S> = Single<InferCreateResult<S>>;
|
|
24
24
|
export declare type InferUpdateResult<S> = S extends {
|
|
25
25
|
update: (id: any, data: any, params: any) => infer R;
|
|
@@ -19,7 +19,7 @@ export declare type InferFindResult<S> = S extends {
|
|
|
19
19
|
} ? Awaited<R> : never;
|
|
20
20
|
export declare type InferCreateResult<S, D = unknown> = S extends {
|
|
21
21
|
create: (data: any, params: any) => infer R;
|
|
22
|
-
} ? D extends
|
|
22
|
+
} ? D extends any[] ? Awaited<AsArray<R>> : D extends InferCreateDataSingle<S> ? Awaited<Single<R>> : Awaited<R> : never;
|
|
23
23
|
export declare type InferCreateResultSingle<S> = Single<InferCreateResult<S>>;
|
|
24
24
|
export declare type InferUpdateResult<S> = S extends {
|
|
25
25
|
update: (id: any, data: any, params: any) => infer R;
|
package/package.json
CHANGED
|
@@ -38,11 +38,11 @@ export type InferFindResult<S> = S extends {
|
|
|
38
38
|
export type InferCreateResult<S, D = unknown> = S extends {
|
|
39
39
|
create: (data: any, params: any) => infer R;
|
|
40
40
|
}
|
|
41
|
-
? D extends
|
|
42
|
-
? Awaited<R
|
|
43
|
-
: D extends
|
|
44
|
-
? Awaited<
|
|
45
|
-
: Awaited<
|
|
41
|
+
? D extends any[]
|
|
42
|
+
? Awaited<AsArray<R>>
|
|
43
|
+
: D extends InferCreateDataSingle<S>
|
|
44
|
+
? Awaited<Single<R>>
|
|
45
|
+
: Awaited<R>
|
|
46
46
|
: never;
|
|
47
47
|
|
|
48
48
|
export type InferCreateResultSingle<S> = Single<InferCreateResult<S>>;
|