◐ Shell
clean mode source ↗

Change Data.construct(from uint8Array:) return type from Data? to Data by kateinoigakukun · Pull Request #752 · swiftwasm/JavaScriptKit

Skip to content

Navigation Menu

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@kateinoigakukun

Summary

  • change Data.construct(from uint8Array:) return type from Data? to Data
  • keep Data.construct(from jsValue:) optional, since converting from JSValue can fail

Rationale

Constructing from an already-typed JSTypedArray<UInt8> cannot fail, so the optional return type is unnecessary.

@kateinoigakukun kateinoigakukun changed the title Make Data typed-array constructor non-optional Change Data.construct(from uint8Array:) return type from Data? to Data

Jun 1, 2026

1 participant

@kateinoigakukun