feathers-utils 1.14.2 → 1.14.3

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,17 +19,17 @@ 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 any[] ? Awaited<AsArray<R>> : D extends InferCreateDataSingle<S> ? Awaited<Single<R>> : Awaited<R> : never;
22
+ } ? D extends any[] ? AsArray<Awaited<R>> : D extends InferCreateDataSingle<S> ? Single<Awaited<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;
26
26
  } ? Awaited<R> : never;
27
27
  export declare type InferPatchResult<S, IdOrNullable = any> = S extends {
28
28
  patch: (id: Id, data: any, params: any) => infer R;
29
- } ? IdOrNullable extends Id ? Awaited<Single<R>> : IdOrNullable extends null ? Awaited<AsArray<R>> : Awaited<R> : never;
29
+ } ? IdOrNullable extends Id ? Single<Awaited<R>> : IdOrNullable extends null ? AsArray<Awaited<R>> : Awaited<R> : never;
30
30
  export declare type InferRemoveResult<S, IdOrNullable = any> = S extends {
31
31
  remove: (id: IdOrNullable, params: any) => infer R;
32
- } ? IdOrNullable extends Id ? Awaited<Single<R>> : IdOrNullable extends null ? Awaited<AsArray<R>> : Awaited<R> : never;
32
+ } ? IdOrNullable extends Id ? Single<Awaited<R>> : IdOrNullable extends null ? AsArray<Awaited<R>> : Awaited<R> : never;
33
33
  export declare type GetService<App extends Application, Path extends string> = App["services"][Path];
34
34
  export declare type InferGetResultFromPath<App extends Application, Path extends string> = InferGetResult<GetService<App, Path>>;
35
35
  export declare type InferFindResultFromPath<App extends Application, Path extends string> = InferFindResult<GetService<App, Path>>;
@@ -19,17 +19,17 @@ 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 any[] ? Awaited<AsArray<R>> : D extends InferCreateDataSingle<S> ? Awaited<Single<R>> : Awaited<R> : never;
22
+ } ? D extends any[] ? AsArray<Awaited<R>> : D extends InferCreateDataSingle<S> ? Single<Awaited<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;
26
26
  } ? Awaited<R> : never;
27
27
  export declare type InferPatchResult<S, IdOrNullable = any> = S extends {
28
28
  patch: (id: Id, data: any, params: any) => infer R;
29
- } ? IdOrNullable extends Id ? Awaited<Single<R>> : IdOrNullable extends null ? Awaited<AsArray<R>> : Awaited<R> : never;
29
+ } ? IdOrNullable extends Id ? Single<Awaited<R>> : IdOrNullable extends null ? AsArray<Awaited<R>> : Awaited<R> : never;
30
30
  export declare type InferRemoveResult<S, IdOrNullable = any> = S extends {
31
31
  remove: (id: IdOrNullable, params: any) => infer R;
32
- } ? IdOrNullable extends Id ? Awaited<Single<R>> : IdOrNullable extends null ? Awaited<AsArray<R>> : Awaited<R> : never;
32
+ } ? IdOrNullable extends Id ? Single<Awaited<R>> : IdOrNullable extends null ? AsArray<Awaited<R>> : Awaited<R> : never;
33
33
  export declare type GetService<App extends Application, Path extends string> = App["services"][Path];
34
34
  export declare type InferGetResultFromPath<App extends Application, Path extends string> = InferGetResult<GetService<App, Path>>;
35
35
  export declare type InferFindResultFromPath<App extends Application, Path extends string> = InferFindResult<GetService<App, Path>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feathers-utils",
3
- "version": "1.14.2",
3
+ "version": "1.14.3",
4
4
  "description": "Some utils for projects using '@feathersjs/feathers'",
5
5
  "author": "fratzinger",
6
6
  "repository": {
@@ -39,9 +39,9 @@ export type InferCreateResult<S, D = unknown> = S extends {
39
39
  create: (data: any, params: any) => infer R;
40
40
  }
41
41
  ? D extends any[]
42
- ? Awaited<AsArray<R>>
42
+ ? AsArray<Awaited<R>>
43
43
  : D extends InferCreateDataSingle<S>
44
- ? Awaited<Single<R>>
44
+ ? Single<Awaited<R>>
45
45
  : Awaited<R>
46
46
  : never;
47
47
 
@@ -57,9 +57,9 @@ export type InferPatchResult<S, IdOrNullable = any> = S extends {
57
57
  patch: (id: Id, data: any, params: any) => infer R;
58
58
  }
59
59
  ? IdOrNullable extends Id
60
- ? Awaited<Single<R>>
60
+ ? Single<Awaited<R>>
61
61
  : IdOrNullable extends null
62
- ? Awaited<AsArray<R>>
62
+ ? AsArray<Awaited<R>>
63
63
  : Awaited<R>
64
64
  : never;
65
65
 
@@ -67,9 +67,9 @@ export type InferRemoveResult<S, IdOrNullable = any> = S extends {
67
67
  remove: (id: IdOrNullable, params: any) => infer R;
68
68
  }
69
69
  ? IdOrNullable extends Id
70
- ? Awaited<Single<R>>
70
+ ? Single<Awaited<R>>
71
71
  : IdOrNullable extends null
72
- ? Awaited<AsArray<R>>
72
+ ? AsArray<Awaited<R>>
73
73
  : Awaited<R>
74
74
  : never;
75
75