refactor: Continue refactoring after migrating to rsbuild

This commit is contained in:
deytenit committed 2026-02-15 12:23:04 +03:00
1 parent baba22ad6f
commit 891027cab0
120 files changed
+751 -483

No files matched your search

+15 -3
View File
@@ -9,11 +9,23 @@ export interface Article {
updatedDate?: Date;
tags?: string[];
image?: string;
Component: React.ComponentType<{ components?: Record<string, React.ComponentType<any>> }>;
Component: React.ComponentType<{ components?: Record<string, React.ComponentType<unknown>> }>;
}
function register(module: any, slug: string): Article {
const { frontmatter, default: Component } = module;
interface MdxModule {
frontmatter: {
title: string;
description?: string;
createdDate: string;
updatedDate?: string;
tags?: string[];
image?: string;
};
default: React.ComponentType<{ components?: Record<string, React.ComponentType<unknown>> }>;
}
function register(module: unknown, slug: string): Article {
const { frontmatter, default: Component } = module as MdxModule;
return {
slug,
title: frontmatter.title,