I have this piece of code where I want to convert test variable which is of type string | undefined to testString of type string. I need help to define the logic to change the type.
@Function()
public formatGit(tests: Gitdb): string | undefined {
var test = tests.gitIssue;
var testString = ??
return test;
}