delta-comic-core 0.3.2 → 0.3.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.
@@ -3,7 +3,11 @@ export declare const definePlugin: (config: PluginConfig | ((safe: boolean) => P
3
3
  fn: import('../utils/eventBus').SharedFunctions[keyof import('../utils/eventBus').SharedFunctions];
4
4
  plugin: string;
5
5
  result: void;
6
- }[] | undefined;
6
+ }[] & Promise<{
7
+ result: void;
8
+ fn: import('../utils/eventBus').SharedFunctions[keyof import('../utils/eventBus').SharedFunctions];
9
+ plugin: string;
10
+ }[]>;
7
11
  export interface RawPluginMeta {
8
12
  'name:display': string;
9
13
  'name:id': string;
@@ -8,7 +8,7 @@ export type EventBus = {
8
8
  };
9
9
  export declare const eventBus: import('mitt').Emitter<EventBus>;
10
10
  export type SharedFunctions = {
11
- getRandomProvide(signal: AbortSignal): PromiseLike<uni.item.Item[]>;
11
+ getRandomProvide(signal?: AbortSignal): PromiseLike<uni.item.Item[]>;
12
12
  addPlugin(ins: PluginConfig): void;
13
13
  addRecent(item: uni.item.Item): PromiseLike<any>;
14
14
  routeToContent(contentType_: uni.content.ContentType_, id: string, ep: string, preload?: uni.content.PreloadValue): PromiseLike<any>;
@@ -27,15 +27,27 @@ export declare class SharedFunction {
27
27
  fn: SharedFunctions[keyof SharedFunctions];
28
28
  plugin: string;
29
29
  result: ReturnType<SharedFunctions[TKey]>;
30
- }[] | undefined;
30
+ }[] & Promise<{
31
+ result: Awaited<ReturnType<SharedFunctions[TKey]>>;
32
+ fn: SharedFunctions[keyof SharedFunctions];
33
+ plugin: string;
34
+ }[]>;
31
35
  static callRandom<TKey extends keyof SharedFunctions>(name: TKey, ...args: Parameters<SharedFunctions[TKey]>): {
32
36
  fn: SharedFunctions[keyof SharedFunctions];
33
37
  plugin: string;
34
38
  result: ReturnType<SharedFunctions[TKey]>;
35
- };
39
+ } & Promise<{
40
+ result: Awaited<ReturnType<SharedFunctions[TKey]>>;
41
+ fn: SharedFunctions[keyof SharedFunctions];
42
+ plugin: string;
43
+ }>;
36
44
  static callWitch<TKey extends keyof SharedFunctions>(name: TKey, plugin: string, ...args: Parameters<SharedFunctions[TKey]>): {
37
45
  fn: SharedFunctions[keyof SharedFunctions];
38
46
  plugin: string;
39
47
  result: ReturnType<SharedFunctions[TKey]>;
40
- };
48
+ }[] & Promise<{
49
+ result: Awaited<ReturnType<SharedFunctions[TKey]>>;
50
+ fn: SharedFunctions[keyof SharedFunctions];
51
+ plugin: string;
52
+ }[]>;
41
53
  }
package/dist/pack.tgz CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "delta-comic-core",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "我曾亲眼见证神的熟视无睹.",
5
5
  "homepage": "https://github.com/wenxig/delta-comic-core",
6
6
  "repository": {