type Resolver[T any] interface {
// Resolve a promise. Unblocks all Await()s. Future calls of Await()// return the resolved value immediately.//// Only the first call to resolve (or reject) has an effect and// further calls are ignored.
Resolve(T)
// Reject a promise with an error. Reject(error)
}
Resolver can resolve or reject a promise.
These methods are separate from 'Promise' to make it clear where the promise is resolved
from.