@milkio/astra 1.0.0-beta.9 → 1.0.0-beta.91

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/index.d.ts CHANGED
@@ -27,8 +27,11 @@ type Logger = {
27
27
  error: (description: string, ...params: Array<unknown>) => Log;
28
28
  response: (description: string, ...params: Array<unknown>) => Log;
29
29
  };
30
- type Log = [string, "[DEBUG]" | "[INFO]" | "[WARN]" | "[ERROR]" | "[RESPONSE]", string, string, ...Array<unknown>];
30
+ type Log = [string, "(debug)" | "(info)" | "(warn)" | "(error)" | "(response)", string, string, ...Array<unknown>];
31
31
  type Reject = (description: string, ...params: Array<unknown>) => Error;
32
+ type DeepPartial<T> = T extends Function ? T : T extends object ? {
33
+ [P in keyof T]?: DeepPartial<T[P]>;
34
+ } : T;
32
35
  export declare function createAstra<AstraOptions extends AstraOptionsInit, Generated extends AstraOptions["stargate"]["$types"]["generated"]>(astraOptions: AstraOptions): Promise<{
33
36
  options: AstraOptions;
34
37
  createMirrorWorld(importMetaUrl: string): Promise<[Context, Reject, Mixin<Awaited<ReturnType<AstraOptions["bootstrap"]>>, {
@@ -40,9 +43,9 @@ export declare function createAstra<AstraOptions extends AstraOptionsInit, Gener
40
43
  execute: <Path extends keyof Generated["routeSchema"]>(path: Path, options?: Mixin<ExecuteOptions, {
41
44
  params?: Generated["routeSchema"][Path]["types"]["params"];
42
45
  } | {
43
- params?: Partial<Generated["routeSchema"][Path]["types"]["params"]>;
46
+ params?: DeepPartial<Generated["routeSchema"][Path]["types"]["params"]>;
44
47
  generateParams: true;
45
- }>) => Promise<Generated["routeSchema"][Path]["types"]["\uD83D\uDC23"] extends boolean ? // action
48
+ }>) => Promise<Generated["routeSchema"][Path]["types"]["\uD83E\uDD5B"] extends boolean ? // action
46
49
  [Partial<Generated["rejectCode"]>, null, ExecuteResultsOption] | [null, Generated["routeSchema"][Path]["types"]["result"], ExecuteResultsOption] : // stream
47
50
  [Partial<Generated["rejectCode"]>, null, ExecuteResultsOption] | [null, AsyncGenerator<[Partial<Generated["rejectCode"]>, null] | [null, GeneratorGeneric<Generated["routeSchema"][Path]["types"]["result"]>], ExecuteResultsOption>]>;
48
51
  }>]>;