Skip to content

Commit

Permalink
update nodegroup types
Browse files Browse the repository at this point in the history
  • Loading branch information
sghall committed Jan 26, 2019
1 parent e960b19 commit b6e0d61
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/createNodeGroup/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface INodeGroupProps {
/**
* Function that returns a string key given a data object and its index. Used to track which nodes are entering, updating and leaving.
*/
keyAccessor: (data: any, index: number) => string;
keyAccessor: (data: any, index: number) => string | number;
/**
* A function that returns the starting state. The function is passed the data and index and must return an object.
*/
Expand All @@ -36,8 +36,6 @@ export interface INodeGroupProps {
children: (nodes: Array<any>) => React.ReactElement<any>;
}

export declare class NodeGroup extends React.Component<INodeGroupProps> { }
export declare class INodeGroup extends React.Component<INodeGroupProps> { }

type createNodeGroup = (func: GetInterpolator, displayName?: string) => NodeGroup

export default createNodeGroup;
export default function createNodeGroup(func: GetInterpolator, displayName?: string): typeof INodeGroup;

0 comments on commit b6e0d61

Please sign in to comment.