I am using agm direction and I am getting this problem in visual studio code:
Type '{ location: { lat: number; lng: number; }; }[]' is not assignable to type 'DirectionsWaypoint[]'.
Type '{ location: { lat: number; lng: number; }; }' is not assignable to type 'DirectionsWaypoint'.
Types of property 'location' are incompatible.
Type '{ lat: number; lng: number; }' is not assignable to type 'string | Place | LatLng'.
Type '{ lat: number; lng: number; }' is missing the following properties from type 'LatLng': equals, toUrlValue, toJSON
The waypoints still show and it works, but my uptight personality does not enjoy seeing a red underline, I am not sure how to get rid of it, any help would be much appreciated.
Code in typescript file:
waypoints = [
{location: { lat: -25.913330, lng: 28.185640 }},
{location: { lat: -25.869650, lng: 28.217950 }}
];
Code in html file:
<agm-direction [origin]="origin" [destination]="destination" [waypoints]="waypoints"></agm-direction>
The error appears under [waypoints]