type o = boolean extends Record<infer X, unknown> ? X : false // valueOf
// ^?
console.log(true.valueOf()) // true
Boolean can extends Record because boolean in JS has properties "valueOf"
this may caught you off guard if you expect anything that extends Record is object type
[hidden by post author]