Files
codeql/javascript/ql/test/query-tests/Declarations/UnusedParameter/tst2.js
2018-08-02 17:53:23 +01:00

40 lines
560 B
JavaScript

function f(x, y) { // NOT OK
return y;
}
function g(x, y) { // OK
return y + arguments[0];
}
function h(x) { // OK
function inner() {
x = 1;
}
}
// OK
/**
* @param {*} x the first argument, deliberately unused
* @param {*} y the second argument
*/
function K(x, y) {
return y;
}
// NOT OK
/**
* @param {*} x the first argument
* @param {*} y the second argument
*/
function K(x, y) {
return y;
}
// OK
/**
* @abstract
* @param {*} x the first argument
* @param {*} y the second argument
*/
A.prototype.f = function(x, y) {};