Weird bug on Mac?

Currently I am on Macbook, but I wrote this code on Windows.

I have next-gen typesolver enabled, and I have restarted my studio already. It says “type keyof not found”, but obviously if you know the new typesolver that is valid syntax: