This commit is contained in:
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 {};
|
20
src/types/shims/router.ts
Normal file
20
src/types/shims/router.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import 'vue-router';
|
||||
|
||||
// declare module 'vue-router' {
|
||||
// interface RouteMeta {
|
||||
// // fromList?: RouteLocationNormalized[]
|
||||
// }
|
||||
|
||||
// interface Router {
|
||||
// stack: {
|
||||
// // list: RouteLocationNormalizedLoaded[]
|
||||
// // currentStackIndex: number
|
||||
// }
|
||||
// }
|
||||
// interface RouteLocationNormalizedGeneric {
|
||||
// // from: RouteLocationNormalizedLoaded
|
||||
// // 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