File tree Expand file tree Collapse file tree 6 files changed +13
-50
lines changed Expand file tree Collapse file tree 6 files changed +13
-50
lines changed Original file line number Diff line number Diff line change @@ -6,21 +6,15 @@ type Configuration = {
6
6
isVirtualized ?: boolean ;
7
7
} ;
8
8
9
- type ConfigurationSound = {
10
- isVirtualized : boolean ;
11
- } ;
9
+ type ConfigurationSound = Required < Configuration > ;
12
10
13
11
type Options = {
14
12
horizontalSpacing ?: number ;
15
13
verticalSpacing ?: number ;
16
14
striped ?: boolean ;
17
15
} ;
18
16
19
- type OptionsSound = {
20
- horizontalSpacing : number ;
21
- verticalSpacing : number ;
22
- striped : boolean ;
23
- } ;
17
+ type OptionsSound = Required < Options > ;
24
18
25
19
// eslint-disable-next-line @typescript-eslint/no-unused-vars
26
20
const getCommonTheme = ( options : OptionsSound , _ : ConfigurationSound ) => ( {
Original file line number Diff line number Diff line change @@ -6,9 +6,7 @@ type Configuration = {
6
6
isVirtualized ?: boolean ;
7
7
} ;
8
8
9
- type ConfigurationSound = {
10
- isVirtualized : boolean ;
11
- } ;
9
+ type ConfigurationSound = Required < Configuration > ;
12
10
13
11
type Options = {
14
12
horizontalSpacing ?: number ;
@@ -17,12 +15,7 @@ type Options = {
17
15
highlightOnHover ?: boolean ;
18
16
} ;
19
17
20
- type OptionsSound = {
21
- horizontalSpacing : number ;
22
- verticalSpacing : number ;
23
- striped : boolean ;
24
- highlightOnHover : boolean ;
25
- } ;
18
+ type OptionsSound = Required < Options > ;
26
19
27
20
// eslint-disable-next-line @typescript-eslint/no-unused-vars
28
21
const getCommonTheme = ( options : OptionsSound , _ : ConfigurationSound ) => ( {
Original file line number Diff line number Diff line change @@ -6,9 +6,7 @@ type Configuration = {
6
6
isVirtualized ?: boolean ;
7
7
} ;
8
8
9
- type ConfigurationSound = {
10
- isVirtualized : boolean ;
11
- } ;
9
+ type ConfigurationSound = Required < Configuration > ;
12
10
13
11
type Options = {
14
12
horizontalSpacing ?: number ;
@@ -17,12 +15,7 @@ type Options = {
17
15
highlightOnHover ?: boolean ;
18
16
} ;
19
17
20
- type OptionsSound = {
21
- horizontalSpacing : number ;
22
- verticalSpacing : number ;
23
- striped : boolean ;
24
- highlightOnHover : boolean ;
25
- } ;
18
+ type OptionsSound = Required < Options > ;
26
19
27
20
// eslint-disable-next-line @typescript-eslint/no-unused-vars
28
21
const getCommonTheme = ( options : OptionsSound , _ : ConfigurationSound ) => ( {
Original file line number Diff line number Diff line change @@ -5,9 +5,7 @@ export type PaginationOptions = {
5
5
isServer ?: boolean ;
6
6
} ;
7
7
8
- export type PaginationOptionsSound = {
9
- isServer : boolean ;
10
- } ;
8
+ export type PaginationOptionsSound = Required < PaginationOptions > ;
11
9
12
10
export type PaginationFunctions = {
13
11
onSetPage : ( page : number ) => void ;
Original file line number Diff line number Diff line change @@ -21,13 +21,7 @@ export type SelectOptions = {
21
21
isPartialToAll ?: boolean ;
22
22
} ;
23
23
24
- export type SelectOptionsSound = {
25
- clickType : SelectClickTypes ;
26
- rowSelect : SelectTypes ;
27
- buttonSelect : SelectTypes ;
28
- isCarryForward : boolean ;
29
- isPartialToAll : boolean ;
30
- } ;
24
+ export type SelectOptionsSound = Required < SelectOptions > ;
31
25
32
26
export type CellSelectProps < T extends TableNode > = {
33
27
item : T ;
Original file line number Diff line number Diff line change @@ -32,21 +32,12 @@ export type SortOptions = {
32
32
isRecursive ?: boolean ;
33
33
} ;
34
34
35
- export type SortOptionsIconSound = {
36
- position : SortIconPositions ;
37
- margin : string ;
38
- size : string ;
39
- iconDefault : React . ReactElement | Nullish ;
40
- iconUp : React . ReactElement | Nullish ;
41
- iconDown : React . ReactElement | Nullish ;
42
- } ;
35
+ export type SortOptionsIconSound = Required < SortOptionsIcon > ;
43
36
44
- export type SortOptionsSound = {
45
- sortFns : Record < string , SortFn > ;
46
- isServer : boolean ;
47
- sortToggleType : SortToggleType ;
48
- sortIcon : SortOptionsIconSound ;
49
- isRecursive : boolean ;
37
+ type SortOptionsSound = {
38
+ [ K in keyof Required < SortOptions > ] : K extends 'sortIcon'
39
+ ? SortOptionsIconSound
40
+ : Required < SortOptions > [ K ] ;
50
41
} ;
51
42
52
43
export type SortFunctionInput = {
You can’t perform that action at this time.
0 commit comments