Next.js Discord

Discord Forum

Cant compile due to type error on params

Unanswered
Giant panda posted this in #help-forum
Open in Discord
Giant pandaOP
This is my type for the page

type PageProps<T> = {
children: ReactNode;
params: Promise<{id: string}> };

But then I get this

Type error: Type 'OmitWithTag<PageProps<{ id: string; }>, keyof PageProps, "default">' does not satisfy the constraint '{ [x: string]: never; }'.
Property 'children' is incompatible with index signature.
Type 'ReactNode' is not assignable to type 'never'.
Type 'undefined' is not assignable to type 'never'.

1 Reply

Asian black bear
Please stop spamming messages for the purposes of gaining visibility.