Comments (2)
hi @xlh001
目前这个仓库里的类型声明并没有在维护,我把它存放在了另外的地方: hamibot-types
你可以使用里面自带的脚本来方便的获取类型声明(推荐 hamibot 代理的那个)。另外如果你使用这个仓库为模板创建项目的话需要根据说明文档里的 迁移说明 来进行一下简单的调整。
我刚才检查了一下你提到的这些函数,click
、longClick
、press
、swipe
这几个函数的声明在 hamibot-types 里面的声明是没有问题的,setScreenMetrics
函数的返回值类型在文档当中就没有具体描述。我测试过以后认为这个函数确实没有返回值,测试代码如下:
let status = setScreenMetrics(device.width, device.height)
console.log('status',status)
得到的结果截图如下:
可以看到返回的值是 undefined
所以我认为应该是没有返回值。
希望能够帮到你,等你回复~
from hamibot-starter.
好的,我调整一下代码判断逻辑
from hamibot-starter.
Related Issues (12)
- threads.start() 无法使用线程呀? HOT 1
- how to use tsx in project? HOT 1
- [QUESTION] 在 src 文件夹下编写代码,程序入口为 src/index.ts HOT 2
- [Bug] OCR模块返回值类型定义错误
- [Bug] 模板使用 ocr 代码参数类型不匹配 HOT 1
- 使用预制函数异常
- getClip()函数找不到了 HOT 1
- [Bug] 依赖更新问题 HOT 4
- [QUESTION] HOT 7
- [QUESTION] HOT 1
- [Bug]华为手机有些功能补兼容无法实现 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hamibot-starter.