mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-05 08:13:06 +08:00
A call of a String.prototype-only method name (trim, toLowerCase, startsWith, ...) on a checker-untyped receiver was lowered as a string call that throws unless the receiver is a string. A checked-dynamic object can carry its own member of that name: zod's schemas assign `trim` in their constructors, so `z.string().trim().min(1)` typed the `trim()` result as a string and refused `.min` with SC1090. Untyped receivers now take the runtime-kind dispatch that object-typed receivers missing the member already use: a string runs the string lowering, any other value calls its own member as Node does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>