feat: 添加对 .md 文件的类型声明
All checks were successful
/ build-and-deploy-to-vercel (push) Successful in 3m7s
/ lint-build-and-check (push) Successful in 5m27s
/ playwright (push) Successful in 1m40s
/ surge (push) Successful in 3m10s
/ cleanup_surge (push) Successful in 49s

This commit is contained in:
严浩
2025-05-02 23:10:38 +08:00
parent 6f06a36e44
commit 695e583136
6 changed files with 27 additions and 11 deletions

20
src/types/unocss.ts Normal file
View File

@ -0,0 +1,20 @@
// https://unocss.dev/presets/attributify#vue-3
// https://github.com/unocss/unocss/pull/4095
// type BasicAttributesFix = import('@unocss/preset-attributify').BasicAttributes | 'b';
// type AttributifyNames<Prefix extends string = ''> =
// | `${Prefix}${BasicAttributesFix}`
// | `${Prefix}${PseudoPrefix}:${BasicAttributes}`;
// declare module '@vue/runtime-dom' {
// interface HTMLAttributes extends Partial<Record<AttributifyNames, string | boolean>> {}
// }
declare module 'vue' {
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
interface HTMLAttributes
extends Partial<Record<import('@unocss/preset-attributify').AttributifyNames, boolean | string>> {}
}
export {};