alchemyOptions.getOption('my-option-id').then(value => {//value is a JSON string like {"success":true,"data":42} });
getOption returns the kew defer, so you can deal with the promise later.
constmyOption=alchemyOptions.getOption('my-option-id');//later in the codemyOption.promise.then(value => {// do something with the value});
If for some reason getOption fails, you can deal with it in the fail method. It can happen if the AJAX request errored or was aborted.
alchemyOptions.getOption('my-option').then(value => {// value is a JSON string like {"success":true,"data":42} }).fail(response => {// failed to get the value });