Skip to content

[Web API type definition issue] Generate wrong TypedArray type #2165

@Korilakkuma

Description

@Korilakkuma

Summary

TypedArray has not generics type

Expected vs. Actual Behavior

  • Expected: Uint8Array or Float32Array ... etc
  • Actual: Uint8Array<ArrayBuffer> or Float32Array<ArrayBuffer> ... etc

Therefore, Typescript (5.9.x )building TypedArray is failure (For example, set Float32Array to curve property in WaveShaperNode, build error occur).

Playground Link

https://github.com/Korilakkuma/XSound/blob/main/src/SoundModule/Effectors/Preamps/Fender.ts#L114

Browser Support

  • This API is supported in at least two major browser engines (not two Chromium-based browsers).

Have Tried The Latest Releases

  • This issue applies to the latest release of TypeScript.
  • This issue applies to the latest release of @types/web.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions