Comparing version 0.1.2 to 0.1.3
@@ -12,3 +12,3 @@ declare type Notify = () => void; | ||
set current(value: T); | ||
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): PromiseLike<TResult1 | TResult2>; | ||
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>; | ||
resolve(value: T): void; | ||
@@ -15,0 +15,0 @@ reject(error: Error): void; |
{ | ||
"name": "async-ref", | ||
"description": "Async ref objects for React. A tiny bridge between React.useSyncExternalStore and React.Suspense.", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"main": "dist/index.js", | ||
@@ -39,4 +39,4 @@ "module": "dist/index.mjs", | ||
"build": "tsup", | ||
"prepublishOnly": "jest && tsup" | ||
"prepublishOnly": "jest && tsc && tsup" | ||
} | ||
} |
@@ -48,3 +48,3 @@ type Notify = () => void; | ||
/** | ||
* The PendingValue resolved itself before the callback was invoked. | ||
* The AsyncMutableRefObject resolved itself before the callback was invoked. | ||
* So here we make sure to still resolve the promise. | ||
@@ -94,3 +94,3 @@ */ | ||
onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null | ||
): PromiseLike<TResult1 | TResult2> { | ||
): Promise<TResult1 | TResult2> { | ||
return this.#promise | ||
@@ -97,0 +97,0 @@ .then( |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
25763