Skip to content

Missing JSDoc annotations in esnext lib declaration files #63512

@Se3do

Description

@Se3do

⚙ Compilation target

ESNext

⚙ Library

esnext

Missing / Incorrect Definition

Several declarations in src/lib/esnext.*.d.ts are missing JSDoc @param and @returns annotations.

Examples include:

  • Error.isError
  • Date.toTemporalInstant
  • Atomics.pause
  • Map/WeakMap getOrInsert*
  • Array.fromAsync
  • Uint8Array.fromHex

Adding the missing annotations improves consistency and IntelliSense documentation without affecting behavior.

Sample Code

const ok = Error.isError(new Error("x"));

const instant = new Date().toTemporalInstant();

Atomics.pause(10);

const map = new Map<string, number>();
map.getOrInsert("a", 1);

const arr = await Array.fromAsync(Promise.resolve([1, 2, 3]));

Uint8Array.fromHex("deadbeef");

// These APIs currently work correctly, but some declarations
// are missing JSDoc @param/@returns annotations used for
// IntelliSense documentation consistency.

Documentation Link

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fromAsync
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics/pause

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions