File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
- // Type definitions for react-virtualzed -tree
1
+ // Type definitions for react-virtualized -tree
2
2
// Definitions by: Diogo Cunha
3
3
4
4
import * as React from 'react' ;
@@ -41,6 +41,8 @@ export interface TreeProps {
41
41
42
42
export default class Tree extends React . Component < TreeProps > { }
43
43
44
+ export type Omit < T , K > = Pick < T , Exclude < keyof T , K > > ;
45
+
44
46
export interface RendererProps < T > {
45
47
measure : ( ) => void ;
46
48
onChange : ( updateParams : NodeAction ) => void ;
@@ -50,15 +52,18 @@ export interface RendererProps<T> {
50
52
children ?: React . ReactNode ;
51
53
}
52
54
53
- type DeletableRenderProps = RendererProps < { delete ?: string } > ;
55
+ export type InjectedRendererProps = Omit < RendererProps < T > , 'iconsClassNameMap' > ;
56
+ export type CustomRendererProps = Omit < RendererProps < T > , 'style' > ;
57
+
58
+ type DeletableRenderProps = CustomRendererProps < { delete ?: string } > ;
54
59
55
- type ExpandableRenderProps = RendererProps < {
60
+ type ExpandableRenderProps = CustomRendererProps < {
56
61
expanded ?: string ;
57
62
collapsed ?: string ;
58
63
lastChild ?: string ;
59
64
} > ;
60
65
61
- type FavoriteRenderProps = RendererProps < {
66
+ type FavoriteRenderProps = CustomRendererProps < {
62
67
favorite ?: string ;
63
68
notFavorite ?: string ;
64
69
} > ;
You can’t perform that action at this time.
0 commit comments