Skip to content

Proxied Functions Do Not Handle Spreading #214

@lilmart210

Description

@lilmart210

The Spreading syntax does not work the same way as it does in normal javascript. The spreading (...) syntax of an array into a function gives the wrong value. When imported from a .js file, the function behaves as expected, however when imported from a .jsx file, the function only puts the first value of the array into a new array.

How To Reproduce
-> Create a new vanilla Solid-js application.
-> Create a new jsx file, and make a function that uses the spread
-> call the spreaded function from any other file I.E(the default app)
-> Changing the file extension back to js, changes the behavior.

Minimum Reproduction

//In a File, the source function
function GlobalTest(...arr){
 console.log(...arr);
}

//Inside of app.jsx
import {GlobalTest} from 'otherfile'

GlobalTest(1,2,3); //  should see a '1' in the log when the source function is in a .jsx
GlobalTest(1,2,3); //  should see a '1 2 3' in the log when the source function is in a .js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions