remax icon indicating copy to clipboard operation
remax copied to clipboard

2.9版本remax集成vant typescrip语法报错

Open ToBeAnotherYou opened this issue 3 years ago • 7 comments

  1. 按照vant官网配置了typescript的支持还是报错 JSX 元素类型“VantButton”不具有任何构造签名或调用签名

ToBeAnotherYou avatar May 14 '21 09:05 ToBeAnotherYou

能给个重现 demo 吗?

yesmeck avatar May 17 '21 08:05 yesmeck

能给个重现demo吗?

https://gitee.com/panfuhao96/wechat-applet/invite_link?invite=885af9973ff845971990a5109ac6d3ab32a7563a535d66c9b7993663152babc51b32302754496b375f318cd36bbddc3a

这个gitee地址邀请

ToBeAnotherYou avatar May 17 '21 08:05 ToBeAnotherYou

编译是没有报错的,就是写代码的时候会提示语法错误

ToBeAnotherYou avatar May 17 '21 08:05 ToBeAnotherYou

你是不是导入的dist下面的代码,dist下面代码做了类型注释文件,但是没有任何内容,因此TypeScript会报错。我是自己写的类型定义。

lee88688 avatar May 25 '21 00:05 lee88688

你是不是导入的dist下面的代码,dist下面代码做了类型注释文件,但是没有任何内容,因此TypeScript会报错。我是自己写的类型定义。

不导入dist还能导入啥?

haobarry avatar Sep 01 '22 08:09 haobarry

你是不是导入的dist下面的代码,dist下面代码做了类型注释文件,但是没有任何内容,因此TypeScript会报错。我是自己写的类型定义。

不导入dist还能导入啥? @haobarry 试着安装一下 vant mini typing https://github.com/fanhaoyuan/vant-weapp-typings

watsonhaw5566 avatar Sep 07 '22 10:09 watsonhaw5566

你是不是导入的dist下面的代码,dist下面代码做了类型注释文件,但是没有任何内容,因此TypeScript会报错。我是自己写的类型定义。

不导入dist还能导入啥? @haobarry 试着安装一下 vant mini typing https://github.com/fanhaoyuan/vant-weapp-typings

好的 谢了

haobarry avatar Sep 10 '22 08:09 haobarry