Skip to content
This repository has been archived by the owner on Sep 28, 2020. It is now read-only.

Commit

Permalink
fix: set types to use generics
Browse files Browse the repository at this point in the history
  • Loading branch information
smacpherson64 committed Sep 27, 2018
1 parent e3f061d commit 7f5daab
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@
// Project: render-propper
// Definitions by: Seth MacPherson <https://github.com/smacpherson64>

declare function renderProp(propCallback: Function): (componentLogic: Function) => Function;
declare function renderProp(propCallback: Function, componentLogic: Function): Function;
declare function renderProp<Input, Results, Output>(
renderer: (input: Input) => (results: Results) => Output
): (logic: (input: Input) => Results) => (input: Input) => Output;

declare function childrenRenderProp(componentLogic: Function): Function;
declare function renderProp<Input, Results, Output>(
renderer: (input: Input) => (results: Results) => Output,
logic: (input: Input) => Results
): (input: Input) => Output;

export {
renderProp,
childrenRenderProp
}
declare function childrenRenderProp<Input, Results, Output>(
logic: (input: Input) => Results
): (input: Input) => Output;

export { renderProp, childrenRenderProp };

0 comments on commit 7f5daab

Please sign in to comment.