I tried with
var polygon = new Polygon(new SpatialReference({ wkid: 4326 }));
polygon.addRing([[-180, -90], [-180, 90], [180, 90], [180, -90], [-180, -90]]);
let boolean = polygon.contains(amspoint);
how to create a ring of my selected method or else can I pass layer directly