native type should be same with web type
See original GitHub issuehttps://github.com/ant-design/ant-design-mobile/blob/master/components/button/PropsType.tsx#L12
ts:
import Button from 'antd-mobile/es/button'
<Button inline />
error:
Property 'inline' does not exist on type
Issue Analytics
- State:
- Created 6 years ago
- Comments:20 (10 by maintainers)
Top Results From Across the Web
Exporting types · Issue #1684 · necolas/react-native-web
Does this library need to export Flow and TypeScript types? ... I think if react-native-web can maintain an exact same type info match...
Read more >How to Choose the Right Type of Mobile App: Native, Web or ...
Native apps are “native” to one platform—you'll need to create different apps for iOS, Android, etc. Hybrid ones work on any device regardless ......
Read more >Native Apps, Web Apps or Hybrid Apps? What's the Difference?
Which type of app should you build? Unfortunately there is no single, definitive answer. The debate between Native Apps vs Hybrid Apps vs...
Read more >The HTML5 input types - Learn web development | MDN
Objective: To understand the newer input type values available to create native form controls, and how to implement them using HTML.
Read more >Native Types and Semantic Categories
The native types included in the type system are all possible data types in the data source for which the connector is built....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@paranoidjk ts这个和babel-plugin-import没有关系
可以用
tsc --traceResolution
来查看ts查找模块的顺序antd-mobile
的typeButton
的type可以看到
antd-mobile
的类型定义是在lib/index.web.d.ts
下的,所有组件的type全部用了web的,Button也不例外所以
import { Button } from 'antd-mobile'
,ts是直接拿到了web的type这也是导致了rn去找类型定义时,拿到了web的type而不是native的
所以如果要把type分开,首先就要解决type入口的问题,现在是写死在
package.json
里的还是 babel-plugin-import 造成的副作用。