Skip to content

Commit

Permalink
docs: fix casing of Wasm (#26954)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret authored Nov 21, 2024
1 parent d17f459 commit be10901
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 34 deletions.
58 changes: 29 additions & 29 deletions cli/tsc/dts/lib.deno.shared_globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -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. */
Expand All @@ -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. */
Expand All @@ -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. */
Expand All @@ -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. */
Expand All @@ -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. */
Expand Down Expand Up @@ -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. */
Expand All @@ -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. */
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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. */
Expand All @@ -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>;

/**
Expand All @@ -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>;

Expand All @@ -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>,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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>,
Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/workers/close_in_wasm_reactions.js
Original file line number Diff line number Diff line change
@@ -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([
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/wasm_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit be10901

Please sign in to comment.