Migrate to typescript
This commit is contained in:
@ -18,7 +18,7 @@ export async function getStaticPaths({ paginate }) {
|
||||
typeof post.category === 'string' && categories.add(post.category.toLowerCase());
|
||||
});
|
||||
|
||||
return Array.from(categories).map((category) =>
|
||||
return Array.from(categories).map((category: string) =>
|
||||
paginate(
|
||||
posts.filter((post) => typeof post.category === 'string' && category === post.category.toLowerCase()),
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ export async function getStaticPaths({ paginate }) {
|
||||
Array.isArray(post.tags) && post.tags.map((tag) => tags.add(tag.toLowerCase()));
|
||||
});
|
||||
|
||||
return Array.from(tags).map((tag) =>
|
||||
return Array.from(tags).map((tag: string) =>
|
||||
paginate(
|
||||
posts.filter((post) => Array.isArray(post.tags) && post.tags.find((elem) => elem.toLowerCase() === tag)),
|
||||
{
|
||||
|
Reference in New Issue
Block a user