Good afternoon, there is a project for react typescript. All the integration has already been fully done, but we got a problem with the display of UI Elements.
When importing a component, I got the error Could not find a declaration file for module ‘box-ui-elements/es/elements/content-explorer’. ‘***/node_modules/box-ui-elements/es/elements/content-explorer/index.js’ implicitly has an ‘any’ type. (any component, this one as an example).
How can I import and make it work instead of with a typescript?
Page 1 / 1
Hello!
The elements have not been migrated to TypeScript yet but you can create a ContentExplorer.d.ts
file in your project and copy the props from the source: https://github.com/box/box-ui-elements/blob/master/src/elements/content-explorer/ContentExplorer.js#L93-L144
or you can add // @ts-ignore
above the import that’s causing the error
Thanks!
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.