From 01bccf5ab70c12becaab635b3e356b295285a4b0 Mon Sep 17 00:00:00 2001 From: Igor Danchenko <64441155+igordanchenko@users.noreply.github.com> Date: Wed, 29 Jan 2025 20:31:06 -0800 Subject: [PATCH] refactor: replace index signature types with records --- src/server/ServerPhotoAlbum.tsx | 2 +- src/ssr/SSR.tsx | 2 +- src/types.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/ServerPhotoAlbum.tsx b/src/server/ServerPhotoAlbum.tsx index 8fc08dc..2617a18 100644 --- a/src/server/ServerPhotoAlbum.tsx +++ b/src/server/ServerPhotoAlbum.tsx @@ -40,7 +40,7 @@ export type ServerPhotoAlbumProps = { /** Custom container class name. */ container?: string; /** Custom class names for the breakpoint intervals. */ - breakpoints?: { [key: number]: string }; + breakpoints?: Record; }; } & ( | ({ layout: Extract } & RowsServerPhotoAlbumProps) diff --git a/src/ssr/SSR.tsx b/src/ssr/SSR.tsx index ef729d3..9718c8d 100644 --- a/src/ssr/SSR.tsx +++ b/src/ssr/SSR.tsx @@ -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; }; }; diff --git a/src/types.ts b/src/types.ts index 1dcba7d..ca2aa30 100644 --- a/src/types.ts +++ b/src/types.ts @@ -125,7 +125,7 @@ export type LayoutModel = { }; /** Layout variables */ -export type LayoutVariables = { [key: string]: string | number | undefined }; +export type LayoutVariables = Record; /** Responsive parameter */ export type ResponsiveParameter = Value | ((containerWidth: number) => Value);