Why push shows argument of type 'any[]' is not assignable to parameter of type 'never' error?
With var markers: []
you are declaring the markers
array as having the type of a permanently empty array. You probably meant var markers = []
to initialize it to empty but allow items to be added.
Change this :
const a = [];
By this :
const a = Array();