parsePromise function
Implementation
Future<Map<String, dynamic>> parsePromise(Promise<dynamic> promise) async {
final response = await promiseToFuture(promise);
final value = dartify(response) as Map<dynamic, dynamic>;
return value.cast<String, dynamic>();
}