Skip to content

Commit

Permalink
refactor: replace index signature types with records
Browse files Browse the repository at this point in the history
  • Loading branch information
igordanchenko committed Jan 30, 2025
1 parent eb46c15 commit 01bccf5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/server/ServerPhotoAlbum.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export type ServerPhotoAlbumProps<TPhoto extends Photo> = {
/** Custom container class name. */
container?: string;
/** Custom class names for the breakpoint intervals. */
breakpoints?: { [key: number]: string };
breakpoints?: Record<number, string>;
};
} & (
| ({ layout: Extract<LayoutType, "rows"> } & RowsServerPhotoAlbumProps<TPhoto>)
Expand Down
2 changes: 1 addition & 1 deletion src/ssr/SSR.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export type SSRProps = {
/** Custom container class name. */
container?: string;
/** Custom class names for the breakpoint intervals. */
breakpoints?: { [key: number]: string };
breakpoints?: Record<number, string>;
};
};

Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export type LayoutModel<TPhoto extends Photo = Photo> = {
};

/** Layout variables */
export type LayoutVariables = { [key: string]: string | number | undefined };
export type LayoutVariables = Record<string, string | number | undefined>;

/** Responsive parameter */
export type ResponsiveParameter<Value = number> = Value | ((containerWidth: number) => Value);
Expand Down

0 comments on commit 01bccf5

Please sign in to comment.