i'm learning ts, seriously, what's wrong with promises? :D
following function gives me this error
Type 'string | void' is not assignable to type 'string'. Type 'void' is not assignable to type 'string'.
export async function getType(serviceID: string, vendor: string, {inventory = defaultKeyinventory } = {}): Promise<string | null>{
const item= inventory !.getItem(serviceID, vendor)
.catch(() => console.log('error'));
return item;
}