Add standalone type definitions

This commit is contained in:
Mitchell McCaffrey
2021-07-08 12:01:02 +10:00
parent 123ebd880a
commit 45a4443dd1
17 changed files with 388 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
import { Outline } from "./Outline";
export type BaseTokenState = {
id: string;
tokenId: string;
owner: string;
size: number;
category: string;
label: string;
statuses: string[];
x: number;
y: number;
lastModifiedBy: string;
lastModified: number;
rotation: number;
locked: boolean;
visible: boolean;
outline: Outline;
width: number;
height: number;
};
export type DefaultTokenState = BaseTokenState & {
type: "default";
key: string;
};
export type FileTokenState = BaseTokenState & {
type: "file";
file: string;
};
export type TokenState = DefaultTokenState | FileTokenState;