From 6ecc86cf2ae4bb0aac6f3d0e954382a69176b387 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Thu, 28 Jan 2021 21:37:21 +0100 Subject: chore: add jsdoc to 26_fetch.js and enable some fetch tests (#9305) --- core/lib.deno_core.d.ts | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 core/lib.deno_core.d.ts (limited to 'core/lib.deno_core.d.ts') diff --git a/core/lib.deno_core.d.ts b/core/lib.deno_core.d.ts new file mode 100644 index 000000000..3e113ca15 --- /dev/null +++ b/core/lib.deno_core.d.ts @@ -0,0 +1,39 @@ +// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. + +// deno-lint-ignore-file no-explicit-any + +/// +/// + +declare namespace Deno { + declare namespace core { + /** Send a JSON op to Rust, and synchronously recieve the result. */ + function jsonOpSync( + opName: string, + args: any, + ...zeroCopy: Uint8Array[] + ): any; + + /** Send a JSON op to Rust, and asynchronously recieve the result. */ + function jsonOpAsync( + opName: string, + args: any, + ...zeroCopy: Uint8Array[] + ): Promise; + + /** + * Retrieve a list of all registered ops, in the form of a map that maps op + * name to internal numerical op id. + */ + function ops(): Record; + + /** + * Retrieve a list of all open resources, in the form of a map that maps + * resource id to the resource name. + */ + function resources(): Record; + + /** Close the resource with the specified op id. */ + function close(rid: number): void; + } +} -- cgit v1.2.3