Skip to content

[TS] Pack rest parameters into an array #373

Closed

Description

@CaelmBleidd

Problem

The frontend records isRest, but the emitted prologue reads one parameter reference without collecting remaining arguments.

Minimal TypeScript example

export function count(...values: number[]): number {
  return values.length;
}

Expected behavior

count() returns 0 and count(1, 2) returns 2. EtsIR must represent the packed array and preserve element order.

Current source evidence

Parameter metadata; prologue.

Checked against current JacoDB neo 873f8e99faf3f1e4736935be96ce1c319985c574. This exact snippet is a proposed regression from the source audit; it has not yet been run as a new end-to-end test.

Acceptance criteria

  • The native TypeScript frontend emits EtsIR preserving the behavior above, including a JSON round trip.
  • A focused regression checks the observable result against TypeScript/Node.js.
  • Until implemented, the construct remains an explicit unsupported outcome; it is not silently represented as ordinary supported behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions