Deno.ForeignFunction
UNSTABLE: New API, yet to be vetted.
The interface for a foreign function as defined by its parameter and result types.
interface ForeignFunction <Parameters extends readonly NativeType[] = readonly NativeType[], Result extends NativeResultType = NativeResultType, NonBlocking extends boolean = boolean> {
callback?: boolean;
name?: string;
nonblocking?: NonBlocking;
optional?: boolean;
parameters: Parameters;
result: Result;
}§Type Parameters
§
Parameters extends readonly NativeType[] = readonly NativeType[]
[src]§
Result extends NativeResultType = NativeResultType
[src]§Properties
§
callback?: boolean
[src]When true
, function calls can safely callback into JavaScript or
trigger a garbage collection event.
§
nonblocking?: NonBlocking
[src]When true
, function calls will run on a dedicated blocking thread and
will return a Promise
resolving to the result
.