Skip to content

On next build, Type error: Type [...] is not generic. #13234

@nickthegit

Description

@nickthegit

Describe the Bug

I have a next.js/payloadcms build:

payload -v 3.45
next -v 15.3.4

When i tried to run build I get a type error originating from the payload-types.ts file

Type error: Type [...] is not generic.

Looking in that file, it appears a few times generally connected to a block type.

Has does anyone else have this issue or any work arounds?

Link to the code that reproduces this issue

n/a

Reproduction Steps

Here is an example of what it's erroring on:

export interface ContentPagesSelect<T extends boolean = true> { title?: T; heroField?: | T | { heroType?: T; subText?: T; heading?: T; image?: T; introText?: T; }; content?: | T | { 'steps-block'?: T | StepsBlockSelect<T>; 'text-block'?: T | TextBlockSelect<T>; 'two-col-block'?: T | TwoColumnBlockSelect<T>; 'three-col-block'?: T | ThreeColumnBlockSelect<T>; 'pay-dates-block'?: T | PayDatesBlockSelect<T>; 'callout-block'?: T | CalloutBlockSelect<T>; }; slug?: T; category?: T; updatedAt?: T; createdAt?: T; _status?: T; }

TwoColblock looks like this:

export interface TwoColumnBlockSelect { title?: boolean; subtitle?: boolean; column1?: boolean; column2?: boolean; id?: boolean; blockName?: boolean; }

Which area(s) are affected? (Select all that apply)

Not sure

Environment Info

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs-triagePossible bug which hasn't been reproduced yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions