type: fhirpath-functionfunction: typecategory: Reflectionsection: 10.2.2source: fhirpath/functions.json
FHIRPath Function: type
No canonical section match found in index.md.
Summary
- Category: Reflection
- Section:
10.2.2 - Return Type:
collection - Empty Input Result:
empty - Errors on Multiple Input:
false
Description
Returns the type information for each element of the input collection, using concrete subtypes of TypeInfo. For primitive types such as String and Integer, the result is a SimpleTypeInfo. For complex types, the result is a ClassInfo.
Arguments
Type Mapping
Example
('John' | 'Mary').type()
// { SimpleTypeInfo { namespace: 'System', name: 'String', baseType: 'System.Any' }, SimpleTypeInfo { namespace: 'System', name: 'String', baseType: 'System.Any' } }