Here is some code I'm working on:
import _ from 'lodash';
function test(num1: number, num2: number) {
console.log(num1, num2);
}
test(..._.take(_.shuffle([0, 1, 2]), 2));
I encountered a TS2556
error while using the TS playground and VSCode.
The error message says: "A spread argument must either have a tuple type or be passed to a rest parameter. (ts2556)"
A similar TS2556
error came up when using repl.it as well.
The error message on repl.it reads: "error TS2556: Expected 2 arguments, but got 0 or more."
Currently, I'm unsure about how to address this issue.