mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-27 06:43:19 +08:00
A typed rest-parameter function passed where a function with fixed parameters is expected (`log(...m: string[])` into `(m: string) => void`) was refused. The function adapter now packs the slot's remaining arguments into the rest array, and the value check admits the function wherever that adapter fits. A nested function declaration with a typed rest parameter becomes a value with its own typed-rest signature, converted at each use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 lines
552 B
Plaintext
5 lines
552 B
Plaintext
- **Function values:** Immutable aliases of overloaded program functions retain per-call overload resolution and identity.
|
|
A function stored in a slot with a different signature remains the same function for equality, array searches, `length`, and own properties.
|
|
Typed rest-parameter functions can be stored and called indirectly, including through a slot with fixed parameters, where the slot's arguments arrive in the rest array.
|
|
Builtin function values have API-specific restrictions; see [Builtin function values](#builtin-function-values).
|