yarn-spinner-runner-ts
Version:
TypeScript parser, compiler, and runtime for Yarn Spinner 3.x with React adapter [NPM package](https://www.npmjs.com/package/yarn-spinner-runner-ts)
30 lines (29 loc) • 700 B
TypeScript
import type { MarkupParseResult } from "../markup/types.js";
export type TextResult = {
type: "text";
text: string;
speaker?: string;
tags?: string[];
markup?: MarkupParseResult;
nodeCss?: string;
scene?: string;
isDialogueEnd: boolean;
};
export type OptionsResult = {
type: "options";
options: {
text: string;
tags?: string[];
css?: string;
markup?: MarkupParseResult;
}[];
nodeCss?: string;
scene?: string;
isDialogueEnd: boolean;
};
export type CommandResult = {
type: "command";
command: string;
isDialogueEnd: boolean;
};
export type RuntimeResult = TextResult | OptionsResult | CommandResult;