From 7f5daab0075e83041ea83b9628d9155c1ad85844 Mon Sep 17 00:00:00 2001 From: Seth MacPherson Date: Wed, 26 Sep 2018 20:47:34 -0500 Subject: [PATCH] fix: set types to use generics --- index.d.ts | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/index.d.ts b/index.d.ts index ad5a22a..e24fb4e 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2,12 +2,17 @@ // Project: render-propper // Definitions by: Seth MacPherson -declare function renderProp(propCallback: Function): (componentLogic: Function) => Function; -declare function renderProp(propCallback: Function, componentLogic: Function): Function; +declare function renderProp( + renderer: (input: Input) => (results: Results) => Output +): (logic: (input: Input) => Results) => (input: Input) => Output; -declare function childrenRenderProp(componentLogic: Function): Function; +declare function renderProp( + renderer: (input: Input) => (results: Results) => Output, + logic: (input: Input) => Results +): (input: Input) => Output; -export { - renderProp, - childrenRenderProp -} \ No newline at end of file +declare function childrenRenderProp( + logic: (input: Input) => Results +): (input: Input) => Output; + +export { renderProp, childrenRenderProp };