Skip to content

Commit 110cd33

Browse files
committed
style: lint
1 parent a7c1d22 commit 110cd33

File tree

2 files changed

+21
-22
lines changed

2 files changed

+21
-22
lines changed

src/index.ts

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
11
/* eslint-disable ts/no-unsafe-argument */
22
/* eslint-disable ts/no-unsafe-assignment */
33

4+
import type {
5+
InfiniteQueryPageParamsOptions,
6+
QueryClient,
7+
QueryFunction,
8+
SkipToken,
9+
} from '@tanstack/vue-query'
10+
import type { CreateTRPCClientOptions, TRPCUntypedClient } from '@trpc/client'
11+
import type { AnyTRPCRouter } from '@trpc/server'
12+
import type { MaybeRefOrGetter } from '@vueuse/core'
13+
import type { UnionToIntersection } from 'type-fest'
14+
import type { DecoratedProcedureRecord, DecorateProcedure } from './types'
415
import {
5-
type InfiniteQueryPageParamsOptions,
6-
type QueryClient,
7-
type QueryFunction,
8-
type SkipToken,
916
queryOptions as defineQueryOptions,
1017
skipToken,
1118
useInfiniteQuery,
1219
useMutation,
1320
useQueries,
1421
useQuery,
1522
} from '@tanstack/vue-query'
16-
import {
17-
type CreateTRPCClientOptions,
18-
type TRPCUntypedClient,
19-
createTRPCUntypedClient,
20-
} from '@trpc/client'
23+
import { createTRPCUntypedClient } from '@trpc/client'
24+
2125
import { createTRPCFlatProxy } from '@trpc/server'
2226
import { createRecursiveProxy } from '@trpc/server/unstable-core-do-not-import'
23-
import { toRef, toRefs, toValue } from '@vueuse/core'
24-
import { computed, isReactive, onScopeDispose, shallowRef, watch } from 'vue'
25-
26-
import type { DecorateProcedure, DecoratedProcedureRecord } from './types'
27-
import type { AnyTRPCRouter } from '@trpc/server'
28-
import type { MaybeRefOrGetter } from '@vueuse/core'
29-
import type { UnionToIntersection } from 'type-fest'
27+
import { toRef, toRefs } from '@vueuse/core'
28+
import { computed, isReactive, onScopeDispose, shallowRef, toValue, watch } from 'vue'
3029

3130
type QueryType = 'query' | 'queries' | 'infinite'
3231
export type TRPCQueryKey = [readonly string[], { input?: unknown; type?: QueryType }?]
@@ -223,7 +222,7 @@ export function createTRPCVueQueryClient<TRouter extends AnyTRPCRouter>({
223222
const decoratedClient = createTRPCFlatProxy<
224223
DecoratedProcedureRecord<TRouter['_def']['record'], TRouter>
225224
>((key) => {
226-
return createVueQueryProxyDecoration(key, client, queryClient)
225+
return createVueQueryProxyDecoration(key.toString(), client, queryClient)
227226
})
228227

229228
return decoratedClient

test/vue-app.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { VueQueryPlugin, useQueryClient } from '@tanstack/vue-query'
1+
import type { InjectionKey } from 'vue'
2+
import type { AppRouter } from './trpc/index'
3+
import { useQueryClient, VueQueryPlugin } from '@tanstack/vue-query'
24
import { createWSClient, httpLink, splitLink, wsLink } from '@trpc/client'
5+
36
import { createApp, inject } from 'vue'
4-
import { WebSocket } from 'ws'
57

8+
import { WebSocket } from 'ws'
69
import { createTRPCVueQueryClient } from '../src/index'
710

8-
import type { AppRouter } from './trpc/index'
9-
import type { InjectionKey } from 'vue'
10-
1111
const trpcKey = Symbol('trpc') as InjectionKey<
1212
ReturnType<typeof createTRPCVueQueryClient<AppRouter>>
1313
>

0 commit comments

Comments
 (0)