JSPromise constructor (1 of 4)
Creates a new JS Promise with an async resolve callback.
C#
public JSPromise(AsyncResolveCallback callback)
parameter | description |
---|---|
callback | Callback that is invoked immediately and must eventually invoke either the resolve function with a JSValue or throw an exception. |
Remarks
Any (sync or async) exception thrown by the callback will be caught and used as a promise rejection error.
See Also
- delegate AsyncResolveCallback
- struct JSPromise
- namespace Microsoft.JavaScript.NodeApi
JSPromise constructor (2 of 4)
Creates a new JS Promise with an async resolve/reject callback.
C#
public JSPromise(AsyncResolveRejectCallback callback)
parameter | description |
---|---|
callback | Callback that is invoked immediately and must eventually invoke either the resolve function with a JSValue , invoke the reject function with a JS Error, or throw an exception. |
Remarks
Any (sync or async) exception thrown by the callback will be caught and used as a promise rejection error.
See Also
- delegate AsyncResolveRejectCallback
- struct JSPromise
- namespace Microsoft.JavaScript.NodeApi
JSPromise constructor (3 of 4)
Creates a new JS Promise with a resolve callback.
C#
public JSPromise(ResolveCallback callback)
parameter | description |
---|---|
callback | Callback that is invoked immediately and must eventually invoke either the resolve function with a JSValue or throw an exception. |
Remarks
Any exception thrown by the callback will be caught and used as a promise rejection error.
See Also
- delegate ResolveCallback
- struct JSPromise
- namespace Microsoft.JavaScript.NodeApi
JSPromise constructor (4 of 4)
Creates a new JS Promise with a resolve/reject callback.
C#
public JSPromise(ResolveRejectCallback callback)
parameter | description |
---|---|
callback | Callback that is invoked immediately and must eventually invoke either the resolve function with a JSValue , invoke the reject function with a JS Error, or throw an exception. |
Remarks
Any exception thrown by the callback will be caught and used as a promise rejection error.
See Also
- delegate ResolveRejectCallback
- struct JSPromise
- namespace Microsoft.JavaScript.NodeApi