Q:

is not assignable to type 'string'.  Type 'void' is not assignable to type 'string'

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;
}

A:

.catch returns a promise but you'll need to return something in your catch block.  You'll need to return string or null. 
export async function getType(
    serviceID: string, 
    vendor: string, 
    { inventory = defaultKeyinventory } = {}
): Promise<string | null>{

    const item= inventory ! .getItem(serviceID, vendor)
        .catch(() => return null);

    return item;
}

