Skip to content

Commit 026d49d

Browse files
antoinerousseaugatsbybot
and
gatsbybot
authored
fix(gatsby): PageProps TS type: add params (#26974)
* PageProps type: add `params` URL parameters when the page has a `matchPath` * `params` is actually always present Co-authored-by: gatsbybot <[email protected]>
1 parent 636068e commit 026d49d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/gatsby/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ export type PageProps<
7878
children: undefined
7979
/** @deprecated use pageContext instead */
8080
pathContext: object
81+
/** The URL parameters when the page has a `matchPath` */
82+
params: Record<string, string>
8183
/** Holds information about the build process for this component */
8284
pageResources: {
8385
component: React.Component

0 commit comments

Comments
 (0)