node_modules/@dcloudio/types/html5plus/plus.d.ts下有 PlusIoDirectoryReader 定义。
其中的readEntries 回调的实际行为,与定义不符,有时返回的是 PlusIoDirectoryEntry[] 对象数组。
请问是类型定义有误还是h5plus的文档有误?
版本:cli工程,vue3-ts-uniapp-3.0.0-4070620250821001
平台:Android
/**
* 读取目录信息对象,用于获取目录中包含的文件及子目录
*
* 参考: [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;
}
node_modules/@dcloudio/types/html5plus/plus.d.ts下有
PlusIoDirectoryReader定义。其中的
readEntries回调的实际行为,与定义不符,有时返回的是 PlusIoDirectoryEntry[] 对象数组。请问是类型定义有误还是h5plus的文档有误?
版本:cli工程,vue3-ts-uniapp-3.0.0-4070620250821001
平台:Android