Ok so after looking around, I found out the answer. You call the resulting promise and operate on the argument to the promise.
keytar.setPassword('KeytarTest', 'AccountName', 'secret');const secret = keytar.getPassword('KeytarTest', 'AccountName');secret.then((result) => { console.log("result: "+ result); // result will be 'secret'});