mirror of
https://github.com/denoland/deno.git
synced 2024-12-21 23:04:45 -05:00
docs: fix casing of Wasm (#26954)
This commit is contained in:
parent
d17f4590a2
commit
be10901dfc
5 changed files with 34 additions and 34 deletions
58
cli/tsc/dts/lib.deno.shared_globals.d.ts
vendored
58
cli/tsc/dts/lib.deno.shared_globals.d.ts
vendored
|
@ -15,14 +15,14 @@
|
|||
/// <reference lib="deno.crypto" />
|
||||
/// <reference lib="deno.ns" />
|
||||
|
||||
/** @category WASM */
|
||||
/** @category Wasm */
|
||||
declare namespace WebAssembly {
|
||||
/**
|
||||
* The `WebAssembly.CompileError` object indicates an error during WebAssembly decoding or validation.
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/CompileError)
|
||||
*
|
||||
* @category WASM
|
||||
* @category Wasm
|
||||
*/
|
||||
export class CompileError extends Error {
|
||||
/** Creates a new `WebAssembly.CompileError` object. */
|
||||
|
@ -36,7 +36,7 @@ declare namespace WebAssembly {
|
|||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global)
|
||||
*
|
||||
* @category WASM
|
||||
* @category Wasm
|
||||
*/
|
||||
export class Global {
|
||||
/** Creates a new `Global` object. */
|
||||
|
@ -59,7 +59,7 @@ declare namespace WebAssembly {
|
|||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance)
|
||||
*
|
||||
* @category WASM
|
||||
* @category Wasm
|
||||
*/
|
||||
export class Instance {
|
||||
/** Creates a new Instance object. */
|
||||
|
@ -79,7 +79,7 @@ declare namespace WebAssembly {
|
|||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/LinkError)
|
||||
*
|
||||
* @category WASM
|
||||
* @category Wasm
|
||||
*/
|
||||
export class LinkError extends Error {
|
||||
/** Creates a new WebAssembly.LinkError object. */
|
||||
|
@ -95,7 +95,7 @@ declare namespace WebAssembly {
|
|||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory)
|
||||
*
|
||||
* @category WASM
|
||||
* @category Wasm
|
||||
*/
|
||||
export class Memory {
|
||||
/** Creates a new `Memory` object. */
|
||||
|
@ -117,7 +117,7 @@ declare namespace WebAssembly {
|
|||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module)
|
||||
*
|
||||
* @category WASM
|
||||
* @category Wasm
|
||||
*/
|
||||
export class Module {
|
||||
/** Creates a new `Module` object. */
|
||||
|
@ -145,7 +145,7 @@ declare namespace WebAssembly {
|
|||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/RuntimeError)
|
||||
*
|
||||
* @category WASM
|
||||
* @category Wasm
|
||||
*/
|
||||
export class RuntimeError extends Error {
|
||||
/** Creates a new `WebAssembly.RuntimeError` object. */
|
||||
|
@ -160,7 +160,7 @@ declare namespace WebAssembly {
|
|||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Table)
|
||||
*
|
||||
* @category WASM
|
||||
* @category Wasm
|
||||
*/
|
||||
export class Table {
|
||||
/** Creates a new `Table` object. */
|
||||
|
@ -182,7 +182,7 @@ declare namespace WebAssembly {
|
|||
/** The `GlobalDescriptor` describes the options you can pass to
|
||||
* `new WebAssembly.Global()`.
|
||||
*
|
||||
* @category WASM
|
||||
* @category Wasm
|
||||
*/
|
||||
export interface GlobalDescriptor {
|
||||
mutable?: boolean;
|
||||
|
@ -192,7 +192,7 @@ declare namespace WebAssembly {
|
|||
/** The `MemoryDescriptor` describes the options you can pass to
|
||||
* `new WebAssembly.Memory()`.
|
||||
*
|
||||
* @category WASM
|
||||
* @category Wasm
|
||||
*/
|
||||
export interface MemoryDescriptor {
|
||||
initial: number;
|
||||
|
@ -203,7 +203,7 @@ declare namespace WebAssembly {
|
|||
/** A `ModuleExportDescriptor` is the description of a declared export in a
|
||||
* `WebAssembly.Module`.
|
||||
*
|
||||
* @category WASM
|
||||
* @category Wasm
|
||||
*/
|
||||
export interface ModuleExportDescriptor {
|
||||
kind: ImportExportKind;
|
||||
|
@ -213,7 +213,7 @@ declare namespace WebAssembly {
|
|||
/** A `ModuleImportDescriptor` is the description of a declared import in a
|
||||
* `WebAssembly.Module`.
|
||||
*
|
||||
* @category WASM
|
||||
* @category Wasm
|
||||
*/
|
||||
export interface ModuleImportDescriptor {
|
||||
kind: ImportExportKind;
|
||||
|
@ -224,7 +224,7 @@ declare namespace WebAssembly {
|
|||
/** The `TableDescriptor` describes the options you can pass to
|
||||
* `new WebAssembly.Table()`.
|
||||
*
|
||||
* @category WASM
|
||||
* @category Wasm
|
||||
*/
|
||||
export interface TableDescriptor {
|
||||
element: TableKind;
|
||||
|
@ -234,7 +234,7 @@ declare namespace WebAssembly {
|
|||
|
||||
/** The value returned from `WebAssembly.instantiate`.
|
||||
*
|
||||
* @category WASM
|
||||
* @category Wasm
|
||||
*/
|
||||
export interface WebAssemblyInstantiatedSource {
|
||||
/* A `WebAssembly.Instance` object that contains all the exported WebAssembly functions. */
|
||||
|
@ -247,21 +247,21 @@ declare namespace WebAssembly {
|
|||
module: Module;
|
||||
}
|
||||
|
||||
/** @category WASM */
|
||||
/** @category Wasm */
|
||||
export type ImportExportKind = "function" | "global" | "memory" | "table";
|
||||
/** @category WASM */
|
||||
/** @category Wasm */
|
||||
export type TableKind = "anyfunc";
|
||||
/** @category WASM */
|
||||
/** @category Wasm */
|
||||
export type ValueType = "f32" | "f64" | "i32" | "i64";
|
||||
/** @category WASM */
|
||||
/** @category Wasm */
|
||||
export type ExportValue = Function | Global | Memory | Table;
|
||||
/** @category WASM */
|
||||
/** @category Wasm */
|
||||
export type Exports = Record<string, ExportValue>;
|
||||
/** @category WASM */
|
||||
/** @category Wasm */
|
||||
export type ImportValue = ExportValue | number;
|
||||
/** @category WASM */
|
||||
/** @category Wasm */
|
||||
export type ModuleImports = Record<string, ImportValue>;
|
||||
/** @category WASM */
|
||||
/** @category Wasm */
|
||||
export type Imports = Record<string, ModuleImports>;
|
||||
|
||||
/**
|
||||
|
@ -272,7 +272,7 @@ declare namespace WebAssembly {
|
|||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compile)
|
||||
*
|
||||
* @category WASM
|
||||
* @category Wasm
|
||||
*/
|
||||
export function compile(bytes: BufferSource): Promise<Module>;
|
||||
|
||||
|
@ -284,7 +284,7 @@ declare namespace WebAssembly {
|
|||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compileStreaming)
|
||||
*
|
||||
* @category WASM
|
||||
* @category Wasm
|
||||
*/
|
||||
export function compileStreaming(
|
||||
source: Response | Promise<Response>,
|
||||
|
@ -301,7 +301,7 @@ declare namespace WebAssembly {
|
|||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiate)
|
||||
*
|
||||
* @category WASM
|
||||
* @category Wasm
|
||||
*/
|
||||
export function instantiate(
|
||||
bytes: BufferSource,
|
||||
|
@ -318,7 +318,7 @@ declare namespace WebAssembly {
|
|||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiate)
|
||||
*
|
||||
* @category WASM
|
||||
* @category Wasm
|
||||
*/
|
||||
export function instantiate(
|
||||
moduleObject: Module,
|
||||
|
@ -332,7 +332,7 @@ declare namespace WebAssembly {
|
|||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiateStreaming)
|
||||
*
|
||||
* @category WASM
|
||||
* @category Wasm
|
||||
*/
|
||||
export function instantiateStreaming(
|
||||
response: Response | PromiseLike<Response>,
|
||||
|
@ -346,7 +346,7 @@ declare namespace WebAssembly {
|
|||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/validate)
|
||||
*
|
||||
* @category WASM
|
||||
* @category Wasm
|
||||
*/
|
||||
export function validate(bytes: BufferSource): boolean;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// https://github.com/denoland/deno/issues/12263
|
||||
// Test for a panic that happens when a worker is closed in the reactions of a
|
||||
// WASM async operation.
|
||||
// Wasm async operation.
|
||||
|
||||
// The minimum valid wasm module, plus two additional zero bytes.
|
||||
const buffer = new Uint8Array([
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// https://github.com/denoland/deno/issues/12263
|
||||
// Test for a panic that happens when a worker is closed in the reactions of a
|
||||
// WASM async operation.
|
||||
// Wasm async operation.
|
||||
|
||||
new Worker(
|
||||
import.meta.resolve("./close_in_wasm_reactions.js"),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// https://github.com/denoland/deno/issues/12263
|
||||
// Test for a panic that happens when a worker is closed in the reactions of a
|
||||
// WASM async operation.
|
||||
// Wasm async operation.
|
||||
|
||||
// The minimum valid wasm module, plus two additional zero bytes.
|
||||
const buffer = new Uint8Array([
|
||||
|
|
|
@ -32,7 +32,7 @@ Deno.test(async function wasmInstantiateWorksWithBuffer() {
|
|||
});
|
||||
|
||||
// V8's default implementation of `WebAssembly.instantiateStreaming()` if you
|
||||
// don't set the WASM streaming callback, is to take a byte source. Here we
|
||||
// don't set the Wasm streaming callback, is to take a byte source. Here we
|
||||
// check that our implementation of the callback disallows it.
|
||||
Deno.test(
|
||||
async function wasmInstantiateStreamingFailsWithBuffer() {
|
||||
|
@ -95,7 +95,7 @@ Deno.test(
|
|||
Deno.test(
|
||||
{ permissions: { net: true } },
|
||||
async function wasmStreamingNonTrivial() {
|
||||
// deno-dom's WASM file is a real-world non-trivial case that gave us
|
||||
// deno-dom's Wasm file is a real-world non-trivial case that gave us
|
||||
// trouble when implementing this.
|
||||
await WebAssembly.instantiateStreaming(fetch(
|
||||
"http://localhost:4545/assets/deno_dom_0.1.3-alpha2.wasm",
|
||||
|
|
Loading…
Reference in a new issue