h5plus下PlusIoDirectoryReader 内类型声明与实际行为有冲突
- Dominant language
- JavaScript
- Stars
- 41.6k
- Forks
- 3.7k
- Avg merge
- 7h 6m
- Merged PRs (30d)
- 6
Description
node_modules/@dcloudio/types/html5plus/plus.d.ts下有 `PlusIoDirectoryReader` 定义。
其中的`readEntries` 回调的实际行为,与定义不符,有时返回的是 PlusIoDirectoryEntry[] 对象数组。
请问是类型定义有误还是h5plus的文档有误?
版本:cli工程,vue3-ts-uniapp-3.0.0-4070620250821001
平台:Android
```typescript
/**
* 读取目录信息对象,用于获取目录中包含的文件及子目录
*
* 参考: [http://www.html5plus.org/doc/zh_cn/io.html](http://www.html5plus.org/doc/zh_cn/io.html)
*/
interface PlusIoDirectoryReader {
/**
* 获取当前目录中的所有文件和子目录
* 获取当前目录下的所有文件和子目录。
* 获取操作成功通过succesCB回调返回,失败则通过errorCB返回。
*
* 参考: [http://www.html5plus.org/doc/zh_cn/io.html](http://www.html5plus.org/doc/zh_cn/io.html)
*/
readEntries(succesCB?: (result: PlusIoDirectoryEntry) => void, errorCB?: (result: any) => void): void;
}
```
Contributor guide
Assessment
This issue has not been assessed yet.