You use setCallback to get the value back. I typically wrap this in a Promise to make it easier to use back in the controller.
// Helper
callServer: function(component, event, helper) {
return new Promise((resolve, reject) => {
const action = component.get("c.getCheckType");
const recordId = component.get("v.recordId");
action.setParams({ recordId });
action.setCallback(this, (response) => {
const state = response.getState();
if(state === 'SUCCESS') {
resolve(response.getReturnValue());
} else if(state === 'ERROR') {
reject(response.getError());
}
});
$A.enqueueAction(action);
});
}
You call this method as follows:
actionMethod: function(component, event, helper) {
helper.callServer(component, event, helper).then(
(result) => {
// This is your string
}
).catch(
(error) => {
// Display an error here
}
);
}