@hyext/preload
Version:
A tools for huya miniapp builder preload something
45 lines (44 loc) • 1.06 kB
TypeScript
export declare type IPreloadFirstScreen = {
url?: string;
bgHeight?: string;
style?: string | {
[key: string]: string;
};
autoRemove?: boolean | number;
mode: IPreloadMode;
delay?: number;
staticDir?: string;
};
export declare type IPreloadMode = 'loading' | 'static-bg';
export declare type IPreloadLink = {
rel: string;
href: string;
as: string;
extra?: string;
};
export declare type IScopeFliter = {
includes?: string[];
excludes?: string[];
};
export declare type IScope = {
firstScreen: IScopeFliter;
};
export interface ExtInfo {
extName: string;
extLogo: string;
extType: string;
}
export interface IPreload {
scope?: IScope;
firstScreen?: IPreloadFirstScreen;
script?: string;
links?: IPreloadLink[];
}
export declare type IPreloadEntry = IPreload | {
[extType: string]: IPreload;
};
export declare type IResolvePreloadCode = {
preloadEntry?: IPreloadEntry;
extInfo: ExtInfo;
projectPath: string;
};