Detect variable change from plugin

I’m using variableSrv to read the value of a variable from a Grafana plugin. But is there a way to trigger an event in case the variable is changed? Right now I have solved it by just checking the variable every 500 ms, and if it has changed I do my stuff. But It would be nice to get an event instead.