Typescript giving benign error: 'caller' implicitly has type 'any'...

In my T3 App I get this benign typescript error (see image) on my testCaller:
'caller' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
'caller' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
Here is my test caller code:
export const createTestCaller = async (userId: string) => {
const ctx = createContextInner({
session: { user: { id: userId } } as Session,
});
return { caller: appRouter.createCaller(ctx), ctx };
};
export const createTestCaller = async (userId: string) => {
const ctx = createContextInner({
session: { user: { id: userId } } as Session,
});
return { caller: appRouter.createCaller(ctx), ctx };
};
It feels as if the typescript server gets overloaded or there is some circular issue or something. Restarting the TS server works sometimes, but sometimes the error remains. Happy for any help or ideas 🙏
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server