/a.js(21,14): error TS1064: The return type of an async function or method must be the global Promise<T> type. Did you mean to write 'Promise<string>'?
/a.js(27,12): error TS1065: The return type of an async function or method must be the global Promise<T> type.
/a.js(45,12): error TS1065: The return type of an async function or method must be the global Promise<T> type.


==== /types.d.ts (0 errors) ====
    declare class Thenable { then(): void; }
    
==== /a.js (3 errors) ====
    /**
     * @callback T1
     * @param {string} str
     * @returns {string}
     */
    
    /**
     * @callback T2
     * @param {string} str
     * @returns {Promise<string>}
     */
    
    /**
     * @callback T3
     * @param {string} str
     * @returns {Thenable}
     */
    
    /**
     * @param {string} str
     * @returns {string}
                 ~~~~~~
!!! error TS1064: The return type of an async function or method must be the global Promise<T> type. Did you mean to write 'Promise<string>'?
     */
    const f1 = async str => {
        return str;
    }
    
    /** @type {T1} */
               ~~
!!! error TS1065: The return type of an async function or method must be the global Promise<T> type.
!!! related TS1064 /a.js:4:14: The return type of an async function or method must be the global Promise<T> type. Did you mean to write 'Promise<string>'?
    const f2 = async str => {
        return str;
    }
    
    /**
     * @param {string} str
     * @returns {Promise<string>}
     */
    const f3 = async str => {
        return str;
    }
    
    /** @type {T2} */
    const f4 = async str => {
        return str;
    }
    
    /** @type {T3} */
               ~~
!!! error TS1065: The return type of an async function or method must be the global Promise<T> type.
!!! related TS1064 /a.js:16:14: The return type of an async function or method must be the global Promise<T> type. Did you mean to write 'Promise<void>'?
    const f5 = async str => {
        return str;
    }
    