Closed milahu closed 2 years ago
input
function f({ a, b, }: { a: string, b: number, }, arg2: string) { return a + arg2 }
actual
/** * @param {{ * a: string, * b: number, * }} { * a, * b, * } * @param {string} arg2 * @returns {string} */ function f({ a, b, }, arg2) { return a + arg2; }
expected: remove the { a, b }
{ a, b }
/** * @param {{ * a: string, * b: number, * }} * @param {string} arg2 * @returns {string} */ function f({ a, b, }, arg2) { return a + arg2; }
javascript has only positional arguments (compared to python's kwargs) so it's safe to skip the variable name if its too complex
input
actual
expected: remove the
{ a, b }
javascript has only positional arguments (compared to python's kwargs) so it's safe to skip the variable name if its too complex