Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential infinite type recursion #3

Open
eqqe opened this issue Jun 25, 2024 · 0 comments
Open

Potential infinite type recursion #3

eqqe opened this issue Jun 25, 2024 · 0 comments

Comments

@eqqe
Copy link

eqqe commented Jun 25, 2024

I was using this project as a starter, and I had type inferences taking a long time.
I deleted the <AppRouter> type annotation (and removed the import)

export const trpc = createTRPCNext({
    config({ ctx }) {
        return {
            transformer: superjson,
            links: [
                httpBatchLink({
                    url: `${getBaseUrl()}/api/trpc`,
                }),
            ],
        };
    },
    ssr: false,
});

I deleted

import type { AppRouter } from '../server/routers/_app';

<AppRouter>
// @ts-ignore
export default trpc.withTRPC(App);

https://github.com/eqqe/application-nextjs-tanstack/pull/39/files

Now my project is much faster in VSCode and build, and I still have all the trpc autocompletion :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant