delphirtl

delphirtl • Docs


delphirtl / hasFieldOfType

Function: 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.

Type Parameters

• T

Parameters

• obj: unknown

• fieldName: string

• fieldType: string

Returns

obj is Object

Defined in

src/sysutils.ts:490