Files
grungnet/src/types/Map.ts

38 lines
670 B
TypeScript
Raw Normal View History

2021-07-08 12:01:02 +10:00
import { Grid } from "./Grid";
export type BaseMap = {
id: string;
name: string;
owner: string;
grid: Grid;
width: number;
height: number;
type: string;
lastModified: number;
created: number;
showGrid: boolean;
snapToGrid: boolean;
};
export type DefaultMap = BaseMap & {
type: "default";
key: string;
};
export type FileMapResolutions = {
low?: string;
medium?: string;
high?: string;
ultra?: string;
};
export type FileMap = BaseMap & {
type: "file";
file: string;
resolutions: FileMapResolutions;
thumbnail: string;
2021-07-09 16:22:35 +10:00
quality: "low" | "medium" | "high" | "ultra" | "original";
2021-07-08 12:01:02 +10:00
};
export type Map = DefaultMap | FileMap;