Skip to content

Commit

Permalink
fix: 🐛 removed style prop from renderer type defs
Browse files Browse the repository at this point in the history
  • Loading branch information
diogofcunha committed Jan 19, 2019
1 parent 2a31d0b commit 3d6bfa1
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Type definitions for react-virtualzed-tree
// Type definitions for react-virtualized-tree
// Definitions by: Diogo Cunha

import * as React from 'react';
Expand Down Expand Up @@ -41,6 +41,8 @@ export interface TreeProps {

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

export type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;

export interface RendererProps<T> {
measure: () => void;
onChange: (updateParams: NodeAction) => void;
Expand All @@ -50,15 +52,18 @@ export interface RendererProps<T> {
children?: React.ReactNode;
}

type DeletableRenderProps = RendererProps<{delete?: string}>;
export type InjectedRendererProps = Omit<RendererProps<T>, 'iconsClassNameMap'>;
export type CustomRendererProps = Omit<RendererProps<T>, 'style'>;

type DeletableRenderProps = CustomRendererProps<{delete?: string}>;

type ExpandableRenderProps = RendererProps<{
type ExpandableRenderProps = CustomRendererProps<{
expanded?: string;
collapsed?: string;
lastChild?: string;
}>;

type FavoriteRenderProps = RendererProps<{
type FavoriteRenderProps = CustomRendererProps<{
favorite?: string;
notFavorite?: string;
}>;
Expand Down

0 comments on commit 3d6bfa1

Please sign in to comment.