GemSwapLessonSteptype
One bilingual native lesson instruction and the corresponding action or tick step.
Import it
import type { GemSwapLessonStep } from "@johnmorrisdotca/houseki/gem-swap";
Definition
type GemSwapLessonStep = {
readonly kind: 'action';
readonly id: string;
readonly action: Action;
readonly accepted: boolean;
readonly reason?: string;
readonly event?: string;
readonly cell?: number;
readonly text: {
readonly en: string;
readonly ja: string;
};
} | {
readonly kind: 'ticks';
readonly id: string;
readonly count: number;
readonly event?: string;
readonly outcome?: string;
readonly cell?: number;
readonly text: {
readonly en: string;
readonly ja: string;
};
};
Examples
import type { GemSwapLessonStep } from "@johnmorrisdotca/houseki/gem-swap";
import { GEM_SWAP_LESSONS } from "@johnmorrisdotca/houseki/gem-swap";
const value: GemSwapLessonStep = GEM_SWAP_LESSONS[0].steps[0];
console.log(value == null ? value : typeof value === "object" ? Object.keys(value).slice(0,6) : value);[ 'kind', 'id', 'action', 'accepted', 'reason', 'text' ]What it prints (run when this page was built)