Skip to content

Commit

Permalink
chore: format and lint changes
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Sep 8, 2024
1 parent fc0ffc4 commit 641f81a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/ui/src/components/Rating/RatingContext.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use client";

import { createContext, useContext } from "react";
import { DynamicStringEnumKeysOf } from "../../types";
import type { FlowbiteRatingTheme } from "./Rating";
import type { FlowbiteStarSizes } from "./RatingStar";
import { DynamicStringEnumKeysOf } from "../../types";

export type RatingContext = {
theme: FlowbiteRatingTheme;
Expand Down
14 changes: 6 additions & 8 deletions packages/ui/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
export type DeepPartial<T> = T extends object
? {
[P in keyof T]?: DeepPartial<T[P]>;
}
: T;
? {
[P in keyof T]?: DeepPartial<T[P]>;
}
: T;

export type RemoveIndexSignature<T> = {
[K in keyof T as string extends K ? never : K]: T[K];
[K in keyof T as string extends K ? never : K]: T[K];
};

export type DynamicStringEnum<T> = T | (string & {});

export type DynamicStringEnumKeysOf<T extends object> = DynamicStringEnum<
keyof RemoveIndexSignature<T>
>;
export type DynamicStringEnumKeysOf<T extends object> = DynamicStringEnum<keyof RemoveIndexSignature<T>>;

0 comments on commit 641f81a

Please sign in to comment.