api-typings icon indicating copy to clipboard operation
api-typings copied to clipboard

FileManager.stat() 类型错误

Open Mister-Hope opened this issue 3 years ago • 1 comments

    interface StatSuccessCallbackResult {
        /** [Stats](https://developers.weixin.qq.com/miniprogram/dev/api/file/Stats.html)|Array.<[Stats](https://developers.weixin.qq.com/miniprogram/dev/api/file/Stats.html)>
         *
         * 当 recursive 为 false 时,res.stats 是一个 Stats 对象。当 recursive 为 true 且 path 是一个目录的路径时,res.stats 是一个 Array,数组的每一项是一个对象,每个对象包含 path 和 stats。 */
        stats: Stats | Stats[]
        errMsg: string
    }

应为

    interface StatSuccessCallbackResult {
        /** [Stats](https://developers.weixin.qq.com/miniprogram/dev/api/file/Stats.html)|Array.<[Stats](https://developers.weixin.qq.com/miniprogram/dev/api/file/Stats.html)>
         *
         * 当 recursive 为 false 时,res.stats 是一个 Stats 对象。当 recursive 为 true 且 path 是一个目录的路径时,res.stats 是一个 Array,数组的每一项是一个对象,每个对象包含 path 和 stats。 */
        stats: Stats | { path: string; stats: Stats }[]
        errMsg: string
    }

Mister-Hope avatar Dec 12 '21 06:12 Mister-Hope

@SgLy I think this is not fixed yet?

Mister-Hope avatar Jan 24 '22 13:01 Mister-Hope

@

Mister-Hope avatar Jan 07 '24 08:01 Mister-Hope