Skip to content

Commit

Permalink
replace Array<> generic type with the shorthand []
Browse files Browse the repository at this point in the history
  • Loading branch information
barrymun committed Jan 10, 2025
1 parent d18a7b9 commit 068c831
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions utils/snippetParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ import { reverseSlugify, slugify } from "../src/utils/slugify";
interface ParseLanguageResponse {
name: string;
icon: string;
categories: Array<{
categories: {
name: string;
snippets: Array<SnippetType>;
}>;
snippets: SnippetType[];
}[];
subLanguages: ParseLanguageResponse[];
}

interface ParseCategoryResponse {
name: string;
snippets: Array<SnippetType>;
snippets: SnippetType[];
}

const propertyRegex = /^\s+([a-zA-Z]+):\s*(.+)/;
Expand Down Expand Up @@ -136,8 +136,8 @@ function parseLanguage(
);
}

const subLanguages: Array<ParseLanguageResponse> = [];
const categories: Array<ParseCategoryResponse> = [];
const subLanguages: ParseLanguageResponse[] = [];
const categories: ParseCategoryResponse[] = [];

for (const category of readdirSync(path)) {
if (category === "icon.svg") continue;
Expand Down

0 comments on commit 068c831

Please sign in to comment.