Skip to content

Commit f610393

Browse files
committed
Update comment
1 parent bc9d830 commit f610393

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/utils/on-ready.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ type Ready = PromiseLike<unknown>; // Any awaitable
1010
* Note: This function is inspired by VueUse, e.g.,
1111
* https://github.com/vueuse/vueuse/blob/v13.8.0/packages/core/useFetch/index.ts#L639-L645
1212
*
13+
* The same pattern is used in URQL as well:
14+
* https://github.com/urql-graphql/urql/blob/%40urql/vue%401.1.2/packages/vue-urql/src/useQuery.ts#L391-L415
15+
*
16+
* Links:
17+
* These links describe the `then` method and thenables:
18+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables
19+
* https://promisesaplus.com/#the-then-method
20+
*
1321
* @param ret - The return value without `then`
1422
* @param ready - Any awaitable that resolves when the `ret` is ready.
1523
* @returns The `ret` with a `then` method.

0 commit comments

Comments
 (0)