Files
scriptc/tests
Chris Tate 032b95d682 Pass strings to an untyped 'data' listener on a child stream after setEncoding
A JavaScript child stream (`child.stdout`) reached through the child's
checked-dynamic box registers its listeners through the stream's own
`on`. The declarations type an unannotated 'data' listener's chunk as a
Buffer, so the listener body checked the chunk as one and threw
`TypeError: expected Uint8Array at $, got string` once `setEncoding` made
the stream pass strings, as in Node's test-child-process-default-options.

When the file calls `setEncoding` on the same access path, an inline
'data' listener registered with on, once, addListener, prependListener
or prependOnceListener now binds its unannotated chunk as a
checked-dynamic value, which holds the string or the Buffer Node passes.
Streams without a `setEncoding` call keep the Buffer-typed chunk.
2026-10-30 00:48:07 -05:00
..
…