mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-08 08:44:37 +08:00
`decoder.decode(view!)` on a `Uint16Array | undefined` (or another typed array that may be undefined) was refused with SC2020: the assertion keeps the undefined arm for decode, and the decode input only read the undefined arm of `Uint8Array | undefined`. The undefined arm of any typed array that may be undefined now reads as an empty array of the same type, so a defined input decodes its bytes and an undefined one decodes no bytes, as in Node.