mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-28 06:53:42 +08:00
Methods of Web objects held in untyped code (Request, Response, Headers, ReadableStream, its reader, AbortSignal) answered member calls only by static name, so a property read such as hono's `raw[key]()` or `typeof req.json` saw undefined. A handle class now lists the methods its invoke answers; a read returns one shared function per method that calls invoke on its `this` and raises Node's ERR_INVALID_THIS TypeError (or a rejected promise for the async operations) on another receiver. The in operator sees the methods and the modeled properties. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>