Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/chakra-ui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,15 @@ type Configuration = {
isVirtualized?: boolean;
};

type ConfigurationSound = {
isVirtualized: boolean;
};
type ConfigurationSound = Required<Configuration>;

type Options = {
horizontalSpacing?: number;
verticalSpacing?: number;
striped?: boolean;
};

type OptionsSound = {
horizontalSpacing: number;
verticalSpacing: number;
striped: boolean;
};
type OptionsSound = Required<Options>;

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const getCommonTheme = (options: OptionsSound, _: ConfigurationSound) => ({
Expand Down
11 changes: 2 additions & 9 deletions src/mantine/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ type Configuration = {
isVirtualized?: boolean;
};

type ConfigurationSound = {
isVirtualized: boolean;
};
type ConfigurationSound = Required<Configuration>;

type Options = {
horizontalSpacing?: number;
Expand All @@ -17,12 +15,7 @@ type Options = {
highlightOnHover?: boolean;
};

type OptionsSound = {
horizontalSpacing: number;
verticalSpacing: number;
striped: boolean;
highlightOnHover: boolean;
};
type OptionsSound = Required<Options>;

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const getCommonTheme = (options: OptionsSound, _: ConfigurationSound) => ({
Expand Down
11 changes: 2 additions & 9 deletions src/material-ui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ type Configuration = {
isVirtualized?: boolean;
};

type ConfigurationSound = {
isVirtualized: boolean;
};
type ConfigurationSound = Required<Configuration>;

type Options = {
horizontalSpacing?: number;
Expand All @@ -17,12 +15,7 @@ type Options = {
highlightOnHover?: boolean;
};

type OptionsSound = {
horizontalSpacing: number;
verticalSpacing: number;
striped: boolean;
highlightOnHover: boolean;
};
type OptionsSound = Required<Options>;

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const getCommonTheme = (options: OptionsSound, _: ConfigurationSound) => ({
Expand Down
4 changes: 1 addition & 3 deletions src/types/pagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ export type PaginationOptions = {
isServer?: boolean;
};

export type PaginationOptionsSound = {
isServer: boolean;
};
export type PaginationOptionsSound = Required<PaginationOptions>;

export type PaginationFunctions = {
onSetPage: (page: number) => void;
Expand Down
8 changes: 1 addition & 7 deletions src/types/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,7 @@ export type SelectOptions = {
isPartialToAll?: boolean;
};

export type SelectOptionsSound = {
clickType: SelectClickTypes;
rowSelect: SelectTypes;
buttonSelect: SelectTypes;
isCarryForward: boolean;
isPartialToAll: boolean;
};
export type SelectOptionsSound = Required<SelectOptions>;

export type CellSelectProps<T extends TableNode> = {
item: T;
Expand Down
19 changes: 5 additions & 14 deletions src/types/sort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,12 @@ export type SortOptions = {
isRecursive?: boolean;
};

export type SortOptionsIconSound = {
position: SortIconPositions;
margin: string;
size: string;
iconDefault: React.ReactElement | Nullish;
iconUp: React.ReactElement | Nullish;
iconDown: React.ReactElement | Nullish;
};
export type SortOptionsIconSound = Required<SortOptionsIcon>;

export type SortOptionsSound = {
sortFns: Record<string, SortFn>;
isServer: boolean;
sortToggleType: SortToggleType;
sortIcon: SortOptionsIconSound;
isRecursive: boolean;
type SortOptionsSound = {
[K in keyof Required<SortOptions>]: K extends 'sortIcon'
? SortOptionsIconSound
: Required<SortOptions>[K];
};

export type SortFunctionInput = {
Expand Down