The current documentation format for arguments does not satisfactorily cover the case found with string replace function. See https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/replace
function somefunc(arg1 | altArg1, arg2 | altArg2){}
The type of the argument changes the behaviour of the function. Whilst this can be achieved with multiple signatures four signatures would be required which is unsatisfactory.
The current documentation format for arguments does not satisfactorily cover the case found with string replace function. See https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/replace
function somefunc(arg1 | altArg1, arg2 | altArg2){}
The type of the argument changes the behaviour of the function. Whilst this can be achieved with multiple signatures four signatures would be required which is unsatisfactory.