This commit is contained in:
12
src/types/shims.d.ts
vendored
12
src/types/shims.d.ts
vendored
@ -1,12 +0,0 @@
|
||||
export {};
|
||||
|
||||
declare global {
|
||||
const $__DEV__: boolean;
|
||||
}
|
||||
|
||||
/* declare module 'vue' {
|
||||
export interface ComponentCustomProperties {
|
||||
$__DEV__: boolean;
|
||||
}
|
||||
}
|
||||
*/
|
11
src/types/shims/global.ts
Normal file
11
src/types/shims/global.ts
Normal file
@ -0,0 +1,11 @@
|
||||
declare global {
|
||||
const $__DEV__: boolean;
|
||||
}
|
||||
|
||||
declare module 'vue' {
|
||||
export interface ComponentCustomProperties {
|
||||
$__DEV__: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
@ -1,8 +1,5 @@
|
||||
import 'vue-router';
|
||||
|
||||
// 为了确保这个文件被当作一个模块,添加至少一个 `export` 声明
|
||||
export {};
|
||||
|
||||
// declare module 'vue-router' {
|
||||
// interface RouteMeta {
|
||||
// // fromList?: RouteLocationNormalized[]
|
||||
@ -19,3 +16,5 @@ export {};
|
||||
// // stackIndex: number
|
||||
// }
|
||||
// }
|
||||
|
||||
export {};
|
15
src/types/shims/unocss.ts
Normal file
15
src/types/shims/unocss.ts
Normal file
@ -0,0 +1,15 @@
|
||||
// https://unocss.dev/presets/attributify#vue-3
|
||||
import type { BasicAttributes, PseudoPrefix } from '@unocss/preset-attributify';
|
||||
|
||||
// https://github.com/unocss/unocss/pull/4095
|
||||
type BasicAttributesFix = 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>> {}
|
||||
}
|
||||
|
||||
export {};
|
Reference in New Issue
Block a user