From bf1072e7abdacec35368b2e1f1834592e27f5ad6 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Thu, 29 Aug 2024 15:13:26 +0100 Subject: [PATCH] add example --- packages/astro/src/types/public/internal.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/astro/src/types/public/internal.ts b/packages/astro/src/types/public/internal.ts index bced5ba2488bc..939c2f5f378e2 100644 --- a/packages/astro/src/types/public/internal.ts +++ b/packages/astro/src/types/public/internal.ts @@ -52,8 +52,18 @@ export interface RouteData { */ component: string; /** - * TBD - * @param data + * @param {any} data The optional parameters of the route + * + * @description + * A function that accepts a list of params, interpolates them with the route pattern, and returns the path name of the route. + * + * ## Example + * + * For a route such as `/blog/[...id].astro`, the `generate` function would return something like this: + * + * ```js + * console.log(generate({ id: 'presentation' })) // will log `/blog/presentation` + * ``` */ generate: (data?: any) => string; /**