generated from thzxcx/vue3
35 lines
1.0 KiB
TypeScript
35 lines
1.0 KiB
TypeScript
/*
|
|
* @Author: peerless_hero peerless_hero@outlook.com
|
|
* @Date: 2023-07-13 04:11:13
|
|
* @LastEditors: zhaojinfeng 121016171@qq.com
|
|
* @LastEditTime: 2023-07-13 12:49:28
|
|
* @FilePath: \uni\utils\resolver.d.ts
|
|
* @Description:
|
|
*
|
|
*/
|
|
interface ImportInfo {
|
|
as?: string;
|
|
name?: string;
|
|
from: string;
|
|
}
|
|
type SideEffectsInfo = (ImportInfo | string)[] | ImportInfo | string | undefined;
|
|
interface ComponentInfo extends ImportInfo {
|
|
sideEffects?: SideEffectsInfo;
|
|
}
|
|
type ComponentResolveResult = string | ComponentInfo | null | undefined | void
|
|
type ComponentResolverFunction = (name: string) => ComponentResolveResult;
|
|
interface ComponentResolverObject {
|
|
type: 'component' | 'directive';
|
|
resolve: ComponentResolverFunction;
|
|
}
|
|
type ComponentResolver = ComponentResolverFunction | ComponentResolverObject;
|
|
|
|
/** th-ui 自动导入解析器 */
|
|
export const resolverThzxcx: ComponentResolver
|
|
|
|
/** thorui 自动导入解析器 */
|
|
export const resolverThorUi: ComponentResolver
|
|
|
|
/** uni-ui 自动导入解析器 */
|
|
export const resolveruUniUi: ComponentResolver
|