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;