Commit Graph

4 Commits

Author SHA1 Message Date
buncis
3983edd0bf fix: update TextInput Typing (#833) 2019-02-12 20:22:00 +01:00
Yukiya Nakagawa
4c918ffb9b fix: fix TypeScript typings for TextInput methods (#753)
### Motivation

* paper version: v2.6.1
* typescript version: v3.2.2

The `TextInput` class has public methods `isFocused`, `clear`, `focus`, `blur`.

https://github.com/callstack/react-native-paper/blob/v2.6.1/src/components/TextInput.js#L348-L374

However, they are not declared in d.ts as below.

![2019-01-24 17 51 02](https://user-images.githubusercontent.com/434227/51666158-ab726300-2000-11e9-9da1-b5a8be0ad32d.png)

### Test plan

Typecheck for below function.

```typescript
import { TextInput } from "react-native-paper";

function doAnything(textInput: TextInput) {
  textInput.isFocused();
  textInput.clear();
  textInput.focus();
  textInput.blur();
}
```
2019-01-24 10:59:28 +01:00
Kacper Wiszczuk
0a2349ad9c fix: fix types for component wrapping other components (#579)
Fixes #578
2018-10-07 13:41:49 +02:00
Kacper Wiszczuk
9e0fe32e14 feat: add typescript support (#561) 2018-10-04 12:04:10 +02:00