Enable some TS consistency lints

This commit is contained in:
Keavon Chambers
2022-08-25 19:00:23 -07:00
parent 881ad667d7
commit 1e74ccb4f8
11 changed files with 66 additions and 42 deletions
+2 -2
View File
@@ -57,11 +57,11 @@ export function createFontsState(editor: Editor) {
}
});
const fontList: Promise<{ family: string; variants: string[]; files: Map<string, string> }[]> = new Promise((resolve) => {
const fontList = new Promise<{ family: string; variants: string[]; files: Map<string, string> }[]>((resolve) => {
fetch(fontListAPI)
.then((response) => response.json())
.then((fontListResponse) => {
const fontListData = fontListResponse.items as { family: string; variants: string[]; files: { [name: string]: string } }[];
const fontListData = fontListResponse.items as { family: string; variants: string[]; files: Record<string, string> }[];
const result = fontListData.map((font) => {
const { family } = font;
const variants = font.variants.map(formatFontStyleName);