@vnejs/compatibility.text-with-scenario.history 0.2.1 → 0.2.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.
package/dist/index.d.ts CHANGED
@@ -4,6 +4,6 @@ import { ModuleCore } from "@vnejs/module.core";
4
4
  import type { PluginConstants, PluginEvents, PluginParams, PluginSettings } from "./types.js";
5
5
  export declare class CompatibilityTextWithScenarioHistory extends ModuleCore<PluginEvents, PluginConstants, PluginSettings, PluginParams> {
6
6
  name: string;
7
- init: () => Promise<unknown[]> | undefined;
8
- onTextEmitNext: () => Promise<unknown[] | undefined>;
7
+ init: () => Promise<import("@vnejs/shared").EmitResults<"vne:text:emit_next_reg">> | undefined;
8
+ onTextEmitNext: () => Promise<import("@vnejs/shared").EmitResults<"vne:history:add"> | undefined>;
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/compatibility.text-with-scenario.history",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -4,7 +4,7 @@ import "@vnejs/contracts.text";
4
4
  import { ModuleCore } from "@vnejs/module.core";
5
5
  import { regModule } from "@vnejs/shared";
6
6
 
7
- import { getTextSpeakerInfo } from "@vnejs/contracts.text";
7
+ import { getTextSpeakerInfo, type TextSpeakerEntry } from "@vnejs/contracts.text";
8
8
 
9
9
  import type { PluginConstants, PluginEvents, PluginParams, PluginSettings } from "./types.js";
10
10
 
@@ -25,7 +25,7 @@ export class CompatibilityTextWithScenarioHistory extends ModuleCore<PluginEvent
25
25
  const args = texts[texts.length - 1].args;
26
26
  const speakerState = this.globalState["text.speaker"];
27
27
  const speaker = speakerState.speaker;
28
- const speakerInfo = await this.emitClone(getTextSpeakerInfo(speakerState, speaker));
28
+ const speakerInfo = await this.emitClone<TextSpeakerEntry | undefined>(getTextSpeakerInfo(speakerState, speaker));
29
29
 
30
30
  return this.emit(this.EVENTS.HISTORY.ADD, { label, text, args, speaker, speakerInfo });
31
31
  };