Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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‎

Lines changed: 6 additions & 6 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /