A mapped type may not declare properties or methods – TypeScript September 15, 2023 by Tarik You need to use Mapped type, not interface: export type MyInterface = { [key in myEnum]: AnotherInterface; }