/**
* @param {true|false} a
*/
function identity(a) {
return a;
}
const ret = identity(true);
console.log("ret", ret);
Current output:
/**
* @param {true|false} a
*/
function identity(a) {
if (!assertType(a, {
"type": "union",
"members": [
"true", // this should be simply: true
"false" // this should be simply: false
],
"optional": false
}, 'identity', 'a')) {
youCanAddABreakpointHere();
}
return a;
}
const ret = identity(true);
console.log("ret", ret);
Example:
Current output: