From 068c8314792352308f09e1fa09f66ab78de4f3e5 Mon Sep 17 00:00:00 2001 From: Neil Murphy Date: Fri, 10 Jan 2025 22:14:34 +0000 Subject: [PATCH] replace Array<> generic type with the shorthand [] --- utils/snippetParser.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/utils/snippetParser.ts b/utils/snippetParser.ts index 8f4bca71..c64f2988 100644 --- a/utils/snippetParser.ts +++ b/utils/snippetParser.ts @@ -9,16 +9,16 @@ import { reverseSlugify, slugify } from "../src/utils/slugify"; interface ParseLanguageResponse { name: string; icon: string; - categories: Array<{ + categories: { name: string; - snippets: Array; - }>; + snippets: SnippetType[]; + }[]; subLanguages: ParseLanguageResponse[]; } interface ParseCategoryResponse { name: string; - snippets: Array; + snippets: SnippetType[]; } const propertyRegex = /^\s+([a-zA-Z]+):\s*(.+)/; @@ -136,8 +136,8 @@ function parseLanguage( ); } - const subLanguages: Array = []; - const categories: Array = []; + const subLanguages: ParseLanguageResponse[] = []; + const categories: ParseCategoryResponse[] = []; for (const category of readdirSync(path)) { if (category === "icon.svg") continue;