adornedPart not working

when i tried contextMenu inside this function The error will show adornedPart is not property with obj.part.


$(go.TextBlock, "Edit", { font: "bold 16px sans-serif",textAlign:"center",width:50,height:20,margin: 8, stroke: "royalblue"}),
            { click: function(e, obj){ 
              var ctxmnu = obj.part;
              var part = ctxmnu.adornedPart; // is Not property for obj.part


Do you mean a compilation error because that is Typescript? Rather than a runtime error? Please be specific.

Cast the part as an Adornment.