MCPcopy Create free account
hub / github.com/nodejs/node-addon-api / InitPromise

Function InitPromise

test/promise.cc:95–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95Object InitPromise(Env env) {
96 Object exports = Object::New(env);
97
98 exports["isPromise"] = Function::New(env, IsPromise);
99 exports["resolvePromise"] = Function::New(env, ResolvePromise);
100 exports["rejectPromise"] = Function::New(env, RejectPromise);
101 exports["promiseReturnsCorrectEnv"] =
102 Function::New(env, PromiseReturnsCorrectEnv);
103 exports["thenMethodOnFulfilled"] = Function::New(env, ThenMethodOnFulfilled);
104 exports["thenMethodOnFulfilledOnRejectedResolve"] =
105 Function::New(env, ThenMethodOnFulfilledOnRejectedResolve);
106 exports["thenMethodOnFulfilledOnRejectedReject"] =
107 Function::New(env, ThenMethodOnFulfilledOnRejectedReject);
108 exports["catchMethod"] = Function::New(env, CatchMethod);
109
110 return exports;
111}

Callers 1

InitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected