How to access AtlassianPlugin's "context" variable in TypeScript/JavaScript?

Hello everybody, I have a question regarding “context” global variable in AtlassianPlugin. As I understood I can actually put anything in this map for later usage, e.g. I’ve put this value there:
context.put("issueKeyInput", "TEST-116");
Now what I’d like to do is to display an alert to the user if the issue key doesn’t match a condition. Like this:
(react/js code)
alert(“Please make sure the context.get("issueKeyInput") issue fields are filled in correctly”)
My question is, how do I pass down this (or any at all) variable from my Java code to my React/TSX/JS code?
Thanks