simple2k13
Version:
some simple functions
7 lines (6 loc) • 327 B
TypeScript
type ScriptAttributes<T = HTMLScriptElement> = {
[K in keyof T]?: T[K];
};
type AttributeObject = Pick<ScriptAttributes, 'async' | 'charset' | 'crossOrigin' | 'defer' | 'noModule' | 'src' | 'type'>;
declare const importScript: (url: string, name: string, attributes?: AttributeObject) => void;
export default importScript;