Skip to content

Expose types for createPages() #2065

@fuma-nama

Description

@fuma-nama

The types of fns parameter are not exposed, e.g. CreatePage & CreateRoot, it is difficult to reuse them when using config-based routing. For example, to separate one createPages into multiple functions:

function dashboard(fns: <Missing_Type>) {

}

function blog(fns: <Missing_Type>) {

}

return createPages(fns => {
  dashboard(fns)
  blog(fns)
  return null as never
})

I think it would be great if the types in create-pages.tsx can be exposed publicly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions