You’ve run across Index signature is missing in type (only on interfaces, not on type alias) #15300
The code will work when you change an interface to a type:
type Foo = {
foo: number
}
const foo: Foo = { foo: 1 };
const bar: Record<string, unknown> = foo;