KEMBAR78
Feature request: Export a "GetStaticPathsResult" Typescript type · Issue #16551 · vercel/next.js · GitHub
Skip to content

Feature request: Export a "GetStaticPathsResult" Typescript type #16551

@ryami333

Description

@ryami333

Feature request

NextJS currently exports the GetStaticPropsResult and GetStaticPropsContext types which helps us to type our module boundaries like so:

import { GetStaticPropsContext, GetStaticPropsResult } from "next";

export async function getStaticProps(
  context: GetStaticPropsContext
): Promise<GetStaticPropsResult> {
  // …
}

My request is for the GetStaticPathsResult type to be exported as well, so we can do the following:

export async function getStaticPaths(): Promise<GetStaticPathsResult> {
  // …
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions