In this trivial example:
type AllowedKeys = 'a' | 'b'
const someObject: Record<AllowedKeys, boolean> = {a:true, b:false}
const anotherObject: Record<AllowedKeys, boolean> = {a:true}
someObject is valid but anotherObject is not:
Property 'b' is missing in type '{ a: true; }' but required in type 'Record<AllowedKeys, boolean>'.
Why is this?