Skip to content

Commit

Permalink
more clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
wobsoriano committed Aug 10, 2024
1 parent 811f73f commit 4ff8653
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export default createConfigForNuxt({
'vue/multi-word-component-names': 'off',
'vue/no-multiple-template-root': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
// '@typescript-eslint/no-unused-var': 'warn'
},
},
)
6 changes: 4 additions & 2 deletions src/client/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@ import { FetchError } from 'ofetch'
import type {
AnyClientTypes,
} from '@trpc/server/unstable-core-do-not-import'
// @ts-expect-error: Nuxt auto-imports
import type { AnyTRPCRouter } from '@trpc/server'
import type { FetchEsque } from '@trpc/client/dist/internals/types'
// @ts-expect-error: Nuxt auto-imports
import { useRequestHeaders } from '#imports'

async function customFetch(input: RequestInfo | URL, init?: RequestInit & { method: 'GET' }) {
return globalThis.$fetch.raw(input.toString(), init)
.catch((e) => {
if (e instanceof FetchError && e.response) { return e.response }
if (e instanceof FetchError && e.response) {
return e.response
}
throw e
})
.then(response => ({
Expand Down

0 comments on commit 4ff8653

Please sign in to comment.