The breeze docs show this to get the property type for a property on an entity:
//get the Person type
var personType = em.metadataStore.getEntityType("Person");
//get the property definition to validate
var websiteProperty = personType.getProperty("website");
But if you are using Typescript this does not work.
The type definitions for MetadataStore.getEntityType
returns an IStructuralType
. But getProperty
is on EntityType
and not on IStructuralType
.
EntityType
does implement IStructuralType
, but there is no guarantee that the IStructuralType
is an EntityType
.
Is this an error in the typing for Breeze? Or is there another way to get this method call?