mirror of
https://github.com/LewdLeah/Auto-Cards.git
synced 2025-07-06 21:50:27 -04:00
Create global.d.ts
This commit is contained in:
parent
f58a49806a
commit
7f526fc613
1 changed files with 50 additions and 0 deletions
50
ts-src/types/global.d.ts
vendored
Normal file
50
ts-src/types/global.d.ts
vendored
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
/// <reference lib="es2022"/>
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue