Promise 中的术语 unwrap 是什么意思?

RT: 经常看到在Promise对象的then()面前写一个unwrap()有什么作用?

login({ username, password })
  .unwrap()
  .then((res) => {
  })
  .catch((err) => {
  });

更具体的代码情况:https://github.com/reduxjs/re...

阅读 3.5k
1 个回答
推荐问题