I am encountering an issue when trying to pass in this.value
as a method argument. The field values are all strings and the constructor arguments are also all strings, so I don't understand why it's not working. When I attempt to pass in this.classField
, it throws an error stating: "Argument of type this:any is not assignable to type string." What am I missing here?
This portion of the code functions correctly:
var sourceApp = this.sourceApp;
var eventType = this.eventType;
var alertType = this.alertType;
var channelType = this.channelType;
var t = new Template({sourceApp, eventType, alertType, channelType});
However, this section does not work:
var t = new Template({this.sourceApp, this.eventType, this.alertType, this.channelType});