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
Top comments (3)
test
test
test
Some comments have been hidden by the post's author - find out more