Skip to content
This repository was archived by the owner on Mar 12, 2024. It is now read-only.

Commit d9f401d

Browse files
chore: formatting
1 parent 70975ba commit d9f401d

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

src/index.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,13 @@ export async function useAsyncQuery<T = any>(
164164
* Creates a signal that every given pricesion interval
165165
* will determine if the current key is currently expired / stale
166166
* and how many time needs to pass till its considered expired / stale.
167-
* This function helps creating
168-
* the controlled sigal on demand rather than creating
169-
* arbitrary signals ourselves just in case.
170-
* Return value is [isStale, staleIn]
167+
* This function helps creating the controlled sigal on demand
168+
* rather than creating arbitrary signals ourselves just in case.
169+
* Return value is [`isStale`, `staleIn`]
171170
*/
172-
function createStale(precision: number): [Readonly<Ref<boolean>>, Readonly<Ref<number>>] {
171+
function createStale(
172+
precision: number,
173+
): [Readonly<Ref<boolean>>, Readonly<Ref<number>>] {
173174
const now = new Date()
174175
const initialKey = computedKey.value
175176

@@ -461,12 +462,13 @@ export function useQuery<T = any>(
461462
* Creates a signal that every given pricesion interval
462463
* will determine if the current key is currently expired / stale
463464
* and how many time needs to pass till its considered expired / stale.
464-
* This function helps creating
465-
* the controlled sigal on demand rather than creating
466-
* arbitrary signals ourselves just in case.
467-
* Return value is [isStale, staleIn]
465+
* This function helps creating the controlled sigal on demand
466+
* rather than creating arbitrary signals ourselves just in case.
467+
* Return value is [`isStale`, `staleIn`]
468468
*/
469-
function createStale(precision: number): [Readonly<Ref<boolean>>, Readonly<Ref<number>>] {
469+
function createStale(
470+
precision: number,
471+
): [Readonly<Ref<boolean>>, Readonly<Ref<number>>] {
470472
const now = new Date()
471473
const initialKey = computedKey.value
472474

src/types.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import type { TurboMutateValue, TurboQuery, TurboQueryOptions } from 'turbo-query'
1+
import type {
2+
TurboMutateValue,
3+
TurboQuery,
4+
TurboQueryOptions,
5+
} from 'turbo-query'
26
import type { Ref } from 'vue'
37

48
export interface TurboVueOptions extends TurboQueryOptions {
@@ -114,7 +118,9 @@ export interface TurboVueResourceActions<T> {
114118
* arbitrary refs ourselves just in case.
115119
* Return value is [isStale (readonly ref), staleIn (readonly ref)]
116120
*/
117-
readonly createStale: (precision: number) => [Readonly<Ref<boolean>>, Readonly<Ref<number>>]
121+
readonly createStale: (
122+
precision: number
123+
) => [Readonly<Ref<boolean>>, Readonly<Ref<number>>]
118124
}
119125

120126
export type TurboVueResource<T> = [
@@ -133,4 +139,3 @@ export type TurboVueResource<T> = [
133139
* Determines how a Vue key looks like.
134140
*/
135141
export type TurboVueKey = () => string | false | null
136-

0 commit comments

Comments
 (0)