Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bakerkretzmar committed Dec 22, 2023
1 parent 36cdd32 commit 2f368ea
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/js/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ type HasQueryParam = { _query?: Record<string, unknown> };
*/
type GenericRouteParamsObject = Record<keyof any, unknown> & HasQueryParam;
// `keyof any` essentially makes it function as a plain `Record`

/**
* An object of parameters for a specific named route.
*/
Expand All @@ -73,13 +72,11 @@ type KnownRouteParamsObject<I extends readonly ParameterInfo[]> = {
// `readonly` allows TypeScript to determine the actual values of all the
// parameter names inside the array, instead of just seeing `string`.
// See https://github.com/tighten/ziggy/pull/664#discussion_r1329978447.

// Uncomment to test:
// type A = KnownRouteParamsObject<
// [{ name: 'foo'; optional: false }, { name: 'bar'; optional: true }]
// >;
// = { foo: ..., bar?: ... }

/**
* An object of route parameters.
*/
Expand Down

0 comments on commit 2f368ea

Please sign in to comment.