I have a string enum type like:
export enum UserRole { admin = "admin", active = "active", blocked = "blocked" }
I
As @NearHuscarl said there is no way to check that. However you can check if djson.role (string) is one of UserRole (enum) values:
djson.role (string)
UserRole (enum)
!!(Object.values(UserRole).find(enumValue => enumValue === djson.role)));