From 8bd7283dc8db09e953dc2524310c08f469bf95d7 Mon Sep 17 00:00:00 2001 From: Umidbek Karimov Date: Fri, 16 Mar 2018 15:42:35 +0500 Subject: [PATCH 1/3] fix(react-native-collapsible/Accordion): Use `any[]` type for `sections`. --- types/react-native-collapsible/Accordion.d.ts | 2 +- .../react-native-collapsible-tests.tsx | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/types/react-native-collapsible/Accordion.d.ts b/types/react-native-collapsible/Accordion.d.ts index 2a2fc04a9f..d4f3ae0dab 100644 --- a/types/react-native-collapsible/Accordion.d.ts +++ b/types/react-native-collapsible/Accordion.d.ts @@ -5,7 +5,7 @@ export interface AccordionProps { /** * An array of sections passed to the render methods */ - sections: string[]; + sections: any[]; /** * A function that should return a renderable representing the header diff --git a/types/react-native-collapsible/react-native-collapsible-tests.tsx b/types/react-native-collapsible/react-native-collapsible-tests.tsx index 1107084f3d..65dd0015b8 100644 --- a/types/react-native-collapsible/react-native-collapsible-tests.tsx +++ b/types/react-native-collapsible/react-native-collapsible-tests.tsx @@ -36,3 +36,27 @@ class AccordianTest extends React.Component { ); } } + +class AccordionComplexTest extends React.Component { + _renderHeader() { + return ( + + ); + } + + _renderContent() { + return ( + + ); + } + + render() { + return ( + + ); + } +} From 5c2c9bd68589391bb8f77c007edd851eb9a81b85 Mon Sep 17 00:00:00 2001 From: Umidbek Karimov Date: Fri, 16 Mar 2018 15:43:47 +0500 Subject: [PATCH 2/3] fix(react-native-collapsible/tsconfig): Add `dom` lib `react-native`. --- types/react-native-collapsible/tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/react-native-collapsible/tsconfig.json b/types/react-native-collapsible/tsconfig.json index c9cb0c9278..7b0c98aa63 100644 --- a/types/react-native-collapsible/tsconfig.json +++ b/types/react-native-collapsible/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ + "dom", "es6" ], "noImplicitAny": true, @@ -22,4 +23,4 @@ "Accordion.d.ts", "react-native-collapsible-tests.tsx" ] -} \ No newline at end of file +} From a1fffb01ebf7b80f2fc8dafbdaaef83ba66f176e Mon Sep 17 00:00:00 2001 From: Umidbek Karimov Date: Fri, 16 Mar 2018 15:51:11 +0500 Subject: [PATCH 3/3] feat(react-native-collapsible): Update contributors info. --- types/react-native-collapsible/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/react-native-collapsible/index.d.ts b/types/react-native-collapsible/index.d.ts index bdfc7cde09..bc107f140a 100644 --- a/types/react-native-collapsible/index.d.ts +++ b/types/react-native-collapsible/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for react-native-collapsible 0.8 // Project: https://github.com/oblador/react-native-collapsible // Definitions by: Kyle Roach +// Umidbek Karimov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6