Skip to content

h5plus下PlusIoDirectoryReader 内类型声明与实际行为有冲突 #6016

Description

@xpxxy

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions