diff options
Diffstat (limited to 'cli/dts/lib.deno.unstable.d.ts')
-rw-r--r-- | cli/dts/lib.deno.unstable.d.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts index b9e9b4d2e..82cb2cc8f 100644 --- a/cli/dts/lib.deno.unstable.d.ts +++ b/cli/dts/lib.deno.unstable.d.ts @@ -250,6 +250,26 @@ declare namespace Deno { copyInto(destination: TypedArray, offset?: number): void; } + /** + * **UNSTABLE**: Unsafe and new API, beware! + * + * An unsafe pointer to a function, for calling functions that are not + * present as symbols. + */ + export class UnsafeFnPointer<Fn extends ForeignFunction> { + pointer: UnsafePointer; + definition: Fn; + + constructor(pointer: UnsafePointer, definition: Fn); + + call( + ...args: StaticForeignFunctionParameters<Fn["parameters"]> + ): ConditionalAsync< + Fn["nonblocking"], + StaticForeignFunctionResult<Fn["result"]> + >; + } + /** A dynamic library resource */ export interface DynamicLibrary<S extends ForeignFunctionInterface> { /** All of the registered symbols along with functions for calling them */ |