delphirtl • Docs
delphirtl / hasFieldOfType
hasFieldOfType<
T
>(obj
,fieldName
,fieldType
):obj is Object
Checks that obj is an object, and it has a field named fieldName and that its type is fieldType
Assuming e is an object with the field code of type string.
• T
• obj: unknown
• fieldName: string
• fieldType: string
obj is Object