type FilterFlags = { [Key in keyof Base]: Key extends Condition ? Key : never }; export type AllowedKey = FilterFlags[keyof Base];