ElemeFE / ElemeFE/element-react

Issues about TypeScript definition

Open
#697 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.8k
Forks
435
PR merge metrics
No merged PRs in 30d

Description

### Description

TypeScript definitions of many components are wrong.

### Reproduce Steps

For example, in [definition of `Input` component](https://github.com/eleme/element-react/blob/1af5231247b5b1b097a5135cf7d0c3e45b50c629/typings/index.d.ts#L437), you write
```
onChange?(e?: React.SyntheticEvent): void
```

in the real world, the component pass the string (value of input) to the `onChange` method, which should be
```
onChange?(value: string): void
```

Another case, `emptyText` is not present in attributes of `Table` components, which is present in your docs.

### Solution

Hopes there will be **a full check of all definition** and fix in TS .d.ts file. Or I may bring a pull request to fix the issues I ran into (which might be not complete)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.