1 | type JsOptions = {
|
2 | type: 'js';
|
3 | js?: Partial<HTMLScriptElement>;
|
4 | keepWhenUnused?: boolean;
|
5 | };
|
6 | type CssOptions = {
|
7 | type: 'css';
|
8 | css?: Partial<HTMLStyleElement>;
|
9 | keepWhenUnused?: boolean;
|
10 | };
|
11 | type DefaultOptions = {
|
12 | type?: never;
|
13 | js?: Partial<HTMLScriptElement>;
|
14 | css?: Partial<HTMLStyleElement>;
|
15 | keepWhenUnused?: boolean;
|
16 | };
|
17 | export type Options = JsOptions | CssOptions | DefaultOptions;
|
18 | export type Status = 'unset' | 'loading' | 'ready' | 'error';
|
19 | declare const useExternal: (path?: string, options?: Options) => Status;
|
20 | export default useExternal;
|