NativeBase: missing typescript definitions in 2.1

Hi, just want to inform you that the following are missing from typescript definitions: getTheme, StyleProvider

For now I have manually changed my local index.d.ts for native-base, but you should definitely include these in the future releases. tnx

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 13
  • Comments: 17 (9 by maintainers)

Commits related to this issue

Most upvoted comments

@shivrajkumar do you support @AleksandarDev making a PR for additional typescript definitions?

@mcd-php @PaitoAnderson Root is now in d.ts (added 8 days ago by shivrajkumar) you can take it from master or wait for next build

Root is also missing

There aro two ways that I can think of.

First is to use spread operator like

<Tabs {...{ onChangeTab: this.handleActiveTab } }>

And the second way is to just change index.d.ts inside node_modules\native-base and just add what is missing. Bad thing with this it will be overwritten when you upgrade native base, unless you add this file to your source control.

Also missing:

  • noShadow property of Header
  • noBorder property of ListItem

Does anyone has workaround for manually extending type definitions to prevent tsc from failing?

These components are also missing from tsd ActionSheet, Form, Segment, Toast

and Tabs component is missing function onChangeTab()