feat: 添加对 .md 文件的类型声明
This commit is contained in:
20
src/types/unocss.ts
Normal file
20
src/types/unocss.ts
Normal 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 {};
|
Reference in New Issue
Block a user