Skip to content

Commit 3699718

Browse files
committed
Fix: exporting correct type for useScriptLoader
1 parent 1ae2d0e commit 3699718

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/hooks/useScriptLoader.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface ScriptLoader {
1111
(config: ScriptLoaderConfiguration): void;
1212
}
1313

14-
const useScriptLoader: ScriptLoader = (config) => {
14+
export default (function useScriptLoader(config) {
1515
const {
1616
source,
1717
onSuccess,
@@ -40,6 +40,4 @@ const useScriptLoader: ScriptLoader = (config) => {
4040
};
4141
void waitForSource();
4242
}, [source, successFunc, errorFunc]);
43-
};
44-
45-
export default useScriptLoader;
43+
} as ScriptLoader);

0 commit comments

Comments
 (0)