I'm trying to build the library(npm i && npm run build) but I'm getting the following error:
> tsc -p .
src/context.ts:27:23 - error TS7017: Element implicitly has an 'any' type because type 'string | number | object | VNode<any> | ComponentChild[]' has no index signature.
27 return (children && children[0]) || render;
~~~~~~~~~~~
src/context.ts:62:32 - error TS2339: Property 'length' does not exist on type 'string | number | object | VNode<any> | ComponentChild[]'.
Property 'length' does not exist on type 'number'.
62 if (children && children.length > 1) {
~~~~~~
src/context.ts:67:28 - error TS7017: Element implicitly has an 'any' type because type 'string | number | object | VNode<any> | ComponentChild[]' has no index signature.
67 return ((children && children[0]) || null) as JSX.Element;
I'm not that familiar with TypeScript but I would appreciate any help.
Hi,
I'm trying to build the library(
npm i && npm run build
) but I'm getting the following error:I'm not that familiar with TypeScript but I would appreciate any help.
Thanks!