@reactuses/core 6.1.6 → 6.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +8 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +8 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2811,11 +2811,17 @@ const useScriptTag = (src, onLoaded = noop, options = defaultOptions$1)=>{
|
|
|
2811
2811
|
// Event listeners
|
|
2812
2812
|
el.addEventListener('error', (event)=>{
|
|
2813
2813
|
setStatus(event.type === 'load' ? 'ready' : 'error');
|
|
2814
|
-
|
|
2814
|
+
const error = new Error(`Failed to load script: ${src}`);
|
|
2815
|
+
error.name = 'ScriptLoadError';
|
|
2816
|
+
error.event = event;
|
|
2817
|
+
return reject(error);
|
|
2815
2818
|
});
|
|
2816
2819
|
el.addEventListener('abort', (event)=>{
|
|
2817
2820
|
setStatus(event.type === 'load' ? 'ready' : 'error');
|
|
2818
|
-
|
|
2821
|
+
const error = new Error(`Script load aborted: ${src}`);
|
|
2822
|
+
error.name = 'ScriptLoadAbortError';
|
|
2823
|
+
error.event = event;
|
|
2824
|
+
return reject(error);
|
|
2819
2825
|
});
|
|
2820
2826
|
el.addEventListener('load', (event)=>{
|
|
2821
2827
|
setStatus(event.type === 'load' ? 'ready' : 'error');
|
package/dist/index.d.cts
CHANGED
|
@@ -3731,7 +3731,7 @@ declare const useFetchEventSource: UseFetchEventSource;
|
|
|
3731
3731
|
* - reset: 將 map 重置為其初始狀態的函數。
|
|
3732
3732
|
* - size: map 的當前大小。
|
|
3733
3733
|
*/
|
|
3734
|
-
type UseMap<K = any, V = any>
|
|
3734
|
+
type UseMap = <K = any, V = any>(
|
|
3735
3735
|
/**
|
|
3736
3736
|
* @zh 初始值,可以为 Map 实例、数组或者一个初始化的函数
|
|
3737
3737
|
* @zh-Hant 初始值,可以為 Map 實例、數組或者一個初始化的函數
|
package/dist/index.d.mts
CHANGED
|
@@ -3731,7 +3731,7 @@ declare const useFetchEventSource: UseFetchEventSource;
|
|
|
3731
3731
|
* - reset: 將 map 重置為其初始狀態的函數。
|
|
3732
3732
|
* - size: map 的當前大小。
|
|
3733
3733
|
*/
|
|
3734
|
-
type UseMap<K = any, V = any>
|
|
3734
|
+
type UseMap = <K = any, V = any>(
|
|
3735
3735
|
/**
|
|
3736
3736
|
* @zh 初始值,可以为 Map 实例、数组或者一个初始化的函数
|
|
3737
3737
|
* @zh-Hant 初始值,可以為 Map 實例、數組或者一個初始化的函數
|
package/dist/index.d.ts
CHANGED
|
@@ -3731,7 +3731,7 @@ declare const useFetchEventSource: UseFetchEventSource;
|
|
|
3731
3731
|
* - reset: 將 map 重置為其初始狀態的函數。
|
|
3732
3732
|
* - size: map 的當前大小。
|
|
3733
3733
|
*/
|
|
3734
|
-
type UseMap<K = any, V = any>
|
|
3734
|
+
type UseMap = <K = any, V = any>(
|
|
3735
3735
|
/**
|
|
3736
3736
|
* @zh 初始值,可以为 Map 实例、数组或者一个初始化的函数
|
|
3737
3737
|
* @zh-Hant 初始值,可以為 Map 實例、數組或者一個初始化的函數
|
package/dist/index.mjs
CHANGED
|
@@ -2803,11 +2803,17 @@ const useScriptTag = (src, onLoaded = noop, options = defaultOptions$1)=>{
|
|
|
2803
2803
|
// Event listeners
|
|
2804
2804
|
el.addEventListener('error', (event)=>{
|
|
2805
2805
|
setStatus(event.type === 'load' ? 'ready' : 'error');
|
|
2806
|
-
|
|
2806
|
+
const error = new Error(`Failed to load script: ${src}`);
|
|
2807
|
+
error.name = 'ScriptLoadError';
|
|
2808
|
+
error.event = event;
|
|
2809
|
+
return reject(error);
|
|
2807
2810
|
});
|
|
2808
2811
|
el.addEventListener('abort', (event)=>{
|
|
2809
2812
|
setStatus(event.type === 'load' ? 'ready' : 'error');
|
|
2810
|
-
|
|
2813
|
+
const error = new Error(`Script load aborted: ${src}`);
|
|
2814
|
+
error.name = 'ScriptLoadAbortError';
|
|
2815
|
+
error.event = event;
|
|
2816
|
+
return reject(error);
|
|
2811
2817
|
});
|
|
2812
2818
|
el.addEventListener('load', (event)=>{
|
|
2813
2819
|
setStatus(event.type === 'load' ? 'ready' : 'error');
|