@snail-js/api 0.1.18 → 0.1.19

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.
@@ -10,7 +10,7 @@ export declare const ExpireSourceMap: Map<string, Set<string>>;
10
10
  export declare const AxiosInstanceMap: Map<string, AxiosInstance>;
11
11
  export declare const StrategyMap: Map<string, (new () => Strategy)[]>;
12
12
  export declare const VersioningMap: Map<string, VersioningOption>;
13
- export declare class SnailServer<RT extends ResponseData = StandardResponseData, DK extends string = "data"> {
13
+ export declare class SnailServer<RT extends ResponseData = Omit<StandardResponseData, "data">, DK extends string = "data"> {
14
14
  private Name;
15
15
  private BaseURL;
16
16
  private Version;
@@ -5,7 +5,7 @@ export type ApiResponse<T> = Promise<{
5
5
  error: Error | null;
6
6
  hitCache?: boolean;
7
7
  }>;
8
- export type ApiProxy<T extends object, RT extends ResponseData = StandardResponseData, DK extends string = "data"> = {
8
+ export type ApiProxy<T extends object, RT extends ResponseData = Omit<StandardResponseData, "data">, DK extends string = "data"> = {
9
9
  [K in keyof T]: T[K] extends (...args: infer A) => any ? RT extends SpecialResponseData ? <RD>(...args: A) => SnailMethod<RD extends SpecialResponseData ? RD : never> : <RD>(...args: A) => RD extends SpecialResponseData ? SnailMethod<RD> : SnailMethod<RT & {
10
10
  [KK in DK]: RD;
11
11
  }> : T[K];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snail-js/api",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "Http Request with Decorators Api, build on axios",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",