Currently, I am working with Typescript and then transpiling my TS code into JavaScript. However, I have encountered an issue that I am struggling to resolve. The error message I am facing is as follows:
Error Found in TypeScript on Line:2 - error TS2304: Cannot find name 'arguments'
Here is the snippet of my TypeScript code causing the problem:
1 function testSomething() {
2 var paramsPassed = arguments;
3 console.log("Received Parameters : ", paramsPassed);
4 return arguments.length;
5 }
6
7 const result = testSomething("this", "is", "a", "demo");
8 console.log("Expected Output: " , result);
I am unsure of how to handle this error or where to look for a solution. Any help would be greatly appreciated.