Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有捷径可以做到这一点...
Promise { fulfill, reject in fulfill(t) }
...其中 t 是 T 并且承诺的类型是Promise<T>。
Promise<T>
Promise(value: t)
其中 t 是 T 的一个实例