# Functions
New creates and returns a new Promise instance the execution function will be called in a separate goroutine and not block the caller's execution process, this function manages of execution flow and will decide based on its internal state which function should call The "resolve" function is invoked on success otherwise invokes a "reject".
Then wraps origin promise and use the resolver function to convert origin result value of type M into type T.