insert-style-link
Version:
Insert, switch or shift a stylesheet <link />
14 lines (13 loc) • 470 B
TypeScript
export declare type InsertStyleLinkOption = {
isSameLink?: (link1: string, link2: string) => boolean;
};
export declare type Inserter = {
use: () => void;
unuse: () => void;
};
export declare const insertStyleLink: (url: string, { isSameLink }?: InsertStyleLinkOption) => Inserter;
export declare type Switcher = {
use: (link: string) => void;
unuse: () => void;
};
export declare const switchStyleLink: (option?: InsertStyleLinkOption) => Switcher;