Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPromiseSettled = errors.New(
"Promise: Cannot resolve/reject a settled promise",
)
Functions ¶
func AsCallback ¶
func AsCallback(fn Callback) napi.Callback
Types ¶
type InvalidValueTypeError ¶
type InvalidValueTypeError struct {
Value any
}
func (InvalidValueTypeError) Error ¶
func (err InvalidValueTypeError) Error() string
type Promise ¶
type Promise struct { Promise napi.Promise ThreadsafeFunction napi.ThreadsafeFunction Result any ResultType PromiseResultType }
type PromiseProvider ¶
type PromiseResultType ¶
type PromiseResultType string
const ( PromiseResultTypeResolved PromiseResultType = "resolved" PromiseResultTypeRejected PromiseResultType = "rejected" )
Click to show internal directories.
Click to hide internal directories.