Closed kungfooman closed 3 weeks ago
This code:
/** * @param {number[]} input */ function add([a, b]) { return a + b; } const ret = add([10, 20]); console.log('ret', ret);
transpiler to:
/** * @param {number[]} input */ function add([a, b]) { if (!inspectType(arguments[0], { "type": "array", "elementType": "number", "optional": false }, 'add', 'arguments[0]')) { youCanAddABreakpointHere(); } return a + b; } const ret = add([10, 20]); console.log('ret', ret);
What I don't like is and how it should be instead:
- }, 'add', 'arguments[0]')) { + }, 'add', 'input')) {
This makes the log more informative.
This code:
transpiler to:
What I don't like is and how it should be instead:
This makes the log more informative.