typescript

This commit is contained in:
Mitchell McCaffrey
2021-07-16 14:55:33 +10:00
parent 68c1c6db0c
commit d80bfa2f1e
103 changed files with 1402 additions and 1336 deletions
+17 -1
View File
@@ -1,5 +1,21 @@
import React from "react";
import { Grid } from "./Grid";
export type MapToolId =
| "move"
| "fog"
| "drawing"
| "measure"
| "pointer"
| "note";
export type MapTool = {
id: MapToolId;
icon: React.ReactNode;
title: string;
SettingsComponent?: React.ElementType;
};
export type BaseMap = {
id: string;
name: string;
@@ -31,7 +47,7 @@ export type FileMap = BaseMap & {
file: string;
resolutions: FileMapResolutions;
thumbnail: string;
quality: "low" | "medium" | "high" | "ultra" | "original";
quality: keyof FileMapResolutions | "original";
};
export type Map = DefaultMap | FileMap;