From dc89784c2f04a2a679b6e6d0c76e0b0b2934e64d Mon Sep 17 00:00:00 2001 From: Vut Pov Date: Wed, 15 Jul 2020 13:22:40 +0700 Subject: [PATCH] update --- example/src/TestContext.ts | 1 - package.json | 2 +- src/index.tsx | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/src/TestContext.ts b/example/src/TestContext.ts index 87d9fb0..a2c54ee 100644 --- a/example/src/TestContext.ts +++ b/example/src/TestContext.ts @@ -28,7 +28,6 @@ export const useTestContext = baseUseContext(Context) export const withTestContext = baseWithContext(Context, 'testContextProps') -// @ts-ignore export const wrapTestProvider = baseContextWrap(TestContextProvider) export default TestContextProvider diff --git a/package.json b/package.json index 0836d10..73fd663 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "base-context-provider", - "version": "1.0.2-a", + "version": "1.0.2-b", "description": "Made with create-react-library", "author": "vuthpov", "license": "MIT", diff --git a/src/index.tsx b/src/index.tsx index d2b7ea9..a5113be 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -31,13 +31,14 @@ class BaseContextProvider extends React.Component< } } +// @ts-ignore interface ContextWrapConfig { props: { [index: string]: any } } -export const baseContextWrap = (Provider: any) => { +export const baseContextWrap : any = (Provider: any) => { return (Component: any, config?: ContextWrapConfig) => (props: any) => ( } /> )