in Older/TypeScript2016.3/app.ts [31:44]
function processResponse(response: AnyResult) {
if (response.status===Status.Success) {
alert(`Hi, ${response.response}!`);
return;
}
if (response.status === Status.Fail) {
alert(`Error requesting name: ${getErrorMessage(response.errorCode)}`);
return;
}
failOnUnknownResponse(response);
}