Access path params in head function
For some reason accessing path params in my head function, in order to set the title, causes weird TS errors. If I remove the quotes, to this
I get this error on the head function
I should also mention, this fails as well
which creates this error on the loader
title: params.slug,I get this error on the head function
'head' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.ts(7023)
I should also mention, this fails as well
which creates this error on the loader
Type '({ params }: LoaderFnContext<Register, RootRoute<Register, undefined, {}, AnyContext, AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, ... 7 more ..., undefined>) => Promise<...>' is not assignable to type '(ctx: LoaderFnContext<Register, RootRoute<Register, undefined, {}, AnyContext, AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, ... 7 more ..., undefined>) => never'.
Type 'Promise<{ slug: string; post: { content: string; }; }>' is not assignable to type 'never'.ts(2322)
