Skip to content

Commit 3d6bfa1

Browse files
committed
fix: 🐛 removed style prop from renderer type defs
1 parent 2a31d0b commit 3d6bfa1

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

index.d.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Type definitions for react-virtualzed-tree
1+
// Type definitions for react-virtualized-tree
22
// Definitions by: Diogo Cunha
33

44
import * as React from 'react';
@@ -41,6 +41,8 @@ export interface TreeProps {
4141

4242
export default class Tree extends React.Component<TreeProps> {}
4343

44+
export type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
45+
4446
export interface RendererProps<T> {
4547
measure: () => void;
4648
onChange: (updateParams: NodeAction) => void;
@@ -50,15 +52,18 @@ export interface RendererProps<T> {
5052
children?: React.ReactNode;
5153
}
5254

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}>;
5459

55-
type ExpandableRenderProps = RendererProps<{
60+
type ExpandableRenderProps = CustomRendererProps<{
5661
expanded?: string;
5762
collapsed?: string;
5863
lastChild?: string;
5964
}>;
6065

61-
type FavoriteRenderProps = RendererProps<{
66+
type FavoriteRenderProps = CustomRendererProps<{
6267
favorite?: string;
6368
notFavorite?: string;
6469
}>;

0 commit comments

Comments
 (0)