typescript object keys from enum code example Example: typescript object key as enum let layer: Partial<Record<MyEnum, any>>;