Skip to content

fix: spread getConstructorParams tuples in download templates - #42

Open
Flame119052 wants to merge 1 commit into
tscircuit:mainfrom
Flame119052:cursor/download-constructor-args-73fd
Open

fix: spread getConstructorParams tuples in download templates#42
Flame119052 wants to merge 1 commit into
tscircuit:mainfrom
Flame119052:cursor/download-constructor-args-73fd

Conversation

@Flame119052

Copy link
Copy Markdown

Summary

Fixes #39

Generic page.tsx and test.ts downloads passed the entire
getConstructorParams() result as a single constructor argument. A tuple
like [{ limit: 7 }, 3] reconstructed as [[{ limit: 7 }, 3]], so the
second argument was undefined.

Generated construction now spreads arrays and wraps a legacy plain-object
return as one argument. The SchematicTracePipelineSolver-specific page
template is unchanged.

Verification

  • bun test tests/format-solver-constructor-call.test.ts
  • bunx tsc --noEmit

Generic page.tsx and test.ts downloads passed the whole
getConstructorParams() result as one argument, so a tuple like
[{ limit: 7 }, 3] reconstructed as [[{ limit: 7 }, 3]]. Spread arrays
and wrap legacy plain-object returns as a single argument.
@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

@Flame119052 is attempting to deploy a commit to the tscircuit Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Downloaded page/test templates pass constructor argument tuples as one argument

1 participant