Skip to content

Commit 068c831

Browse files
committed
replace Array<> generic type with the shorthand []
1 parent d18a7b9 commit 068c831

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

utils/snippetParser.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ import { reverseSlugify, slugify } from "../src/utils/slugify";
99
interface ParseLanguageResponse {
1010
name: string;
1111
icon: string;
12-
categories: Array<{
12+
categories: {
1313
name: string;
14-
snippets: Array<SnippetType>;
15-
}>;
14+
snippets: SnippetType[];
15+
}[];
1616
subLanguages: ParseLanguageResponse[];
1717
}
1818

1919
interface ParseCategoryResponse {
2020
name: string;
21-
snippets: Array<SnippetType>;
21+
snippets: SnippetType[];
2222
}
2323

2424
const propertyRegex = /^\s+([a-zA-Z]+):\s*(.+)/;
@@ -136,8 +136,8 @@ function parseLanguage(
136136
);
137137
}
138138

139-
const subLanguages: Array<ParseLanguageResponse> = [];
140-
const categories: Array<ParseCategoryResponse> = [];
139+
const subLanguages: ParseLanguageResponse[] = [];
140+
const categories: ParseCategoryResponse[] = [];
141141

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

0 commit comments

Comments
 (0)