Object.assign替代写法

export function ensureAppTimeouts(timeouts = {}) {
    return {
        ...DEFAULT_TIMEOUTS,
        ...timeouts
    }
    return Object.assign({},DEFAULT_TIMEOUTS,timeouts)
}

 

posted @ 2020-06-05 22:03  TTtttt5  阅读(789)  评论(0编辑  收藏  举报