Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Typescript 坚持使用react原生redash库_Typescript_React Native - Fatal编程技术网

Typescript 坚持使用react原生redash库

Typescript 坚持使用react原生redash库,typescript,react-native,Typescript,React Native,在编写代码时,我被react原生redash库卡住了)。我不能在本视频中使用来自react native redash的Vector(或vec)和OnGetureEvent。因为它们没有实现(vec只有“创建功能”,没有“设置功能”) 有人知道是什么问题吗?我在我的项目中使用了Typescript。我读过redash的文档,但不知道在什么情况下应用它。先谢谢你 我在项目中使用的库: “react native Reactivated”:“~1.7.0” “react native redash”

在编写代码时,我被react原生redash库卡住了)。我不能在本视频中使用来自react native redash的Vector(或vec)和OnGetureEvent。因为它们没有实现(vec只有“创建功能”,没有“设置功能”)

有人知道是什么问题吗?我在我的项目中使用了Typescript。我读过redash的文档,但不知道在什么情况下应用它。先谢谢你

我在项目中使用的库:

“react native Reactivated”:“~1.7.0”

“react native redash”:“^15.6.0”

“反应本机手势处理程序”:“~1.6.0”


“react native”:“0.61.4”

我在执行以下步骤后得到答案:

  • 将此行“include”:[“node_modules/react native redash/lib/typescript/v1/index.d.ts”]添加到tsconfig
  • 从导入所需的任何函数/变量。例如,您想添加'OnGetureEvent'函数:从“react native redash/lib/module/v1”导入{OnGetureEvent}
但是我在tsconfig中遇到了一些新问题,比如一些路径的别名设置被红色下划线警告,并且代码建议无法使用此“react native redash/lib/module/v1”中的函数/变量