I have a typescript class which includes propertys for a connection:
export default class Connection
{
public IceServer: string;
public SwitchId: number;
public AgendId: number;
public password: string;
}
I am then trying to access these property’s from within a javascript file:
import Connection from './Models/ConnectionDetails';
function Connect() {
var con = new Connection();
var postData = {IceServer: con.IceServer, SwitchId: con.SwitchId, AgentId: con.AgendId, Password: con.password};
JSON.stringify(postData);
// create JWT
const token = jwt.sign({iceServer, switchId, agentId, password}, process.env.TOKEN_SECRET);
MakeRequest('connect', postData, token);
When i run the application it gives me the following error:
Does anyone know why this is occuring? Thankyou