From 7f526fc613b73c8454d5d28e1165df62a1a15702 Mon Sep 17 00:00:00 2001 From: LewdLeah Date: Sat, 24 May 2025 18:26:21 -0400 Subject: [PATCH] Create global.d.ts --- ts-src/types/global.d.ts | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 ts-src/types/global.d.ts diff --git a/ts-src/types/global.d.ts b/ts-src/types/global.d.ts new file mode 100644 index 0000000..89f299f --- /dev/null +++ b/ts-src/types/global.d.ts @@ -0,0 +1,50 @@ +/// +/// + +export interface History { + text: string; + type: "continue" | "say" | "do" | "story" | "see" | "repeat" | "start" | "unknown"; + rawText: string; +} + +export interface StoryCard { + id: string; + title: string; + keys: string; + type: string; + /** + * This is `value` when exported + */ + entry: string; + description: string; +} + +export interface State { + key: string; + memory: Memory; + message: string; + [key: string]: unknown; +} +export interface Memory { + context: string; + authorsNote: string; +} +export interface Info { + actionCount: number; + characters: string[]; + [key: string]: unknown; +} + +declare global { + let stop: boolean; + let text: unknown; + function AutoCards(): unknown; + function addStoryCard(): unknown; + function removeStoryCard(): unknown; + function log(): void; + const history: History[]; + const storyCards: StoryCard[]; + const state: State; + const memory: Memory; + const info: Info; +}