templateInsideCallback.js(3,5): error TS8039: A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag
templateInsideCallback.js(4,15): error TS2304: Cannot find name 'T'.
templateInsideCallback.js(5,15): error TS2304: Cannot find name 'T'.
templateInsideCallback.js(9,5): error TS8039: A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag
templateInsideCallback.js(10,12): error TS2304: Cannot find name 'T'.
templateInsideCallback.js(11,14): error TS2304: Cannot find name 'T'.
templateInsideCallback.js(15,11): error TS2315: Type 'Call' is not generic.
templateInsideCallback.js(15,16): error TS2304: Cannot find name 'T'.
templateInsideCallback.js(17,18): error TS7006: Parameter 'x' implicitly has an 'any' type.
templateInsideCallback.js(23,5): error TS8039: A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag
templateInsideCallback.js(30,5): error TS8039: A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag
templateInsideCallback.js(31,5): error TS8039: A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag
templateInsideCallback.js(32,12): error TS2304: Cannot find name 'T'.
templateInsideCallback.js(33,16): error TS2304: Cannot find name 'T'.
templateInsideCallback.js(33,22): error TS2304: Cannot find name 'U'.
templateInsideCallback.js(34,14): error TS2304: Cannot find name 'U'.
templateInsideCallback.js(38,5): error TS8039: A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag
templateInsideCallback.js(39,12): error TS2304: Cannot find name 'T'.
templateInsideCallback.js(40,14): error TS2304: Cannot find name 'T'.


==== templateInsideCallback.js (19 errors) ====
    /**
     * @typedef Oops
     * @template T
        ~~~~~~~~
!!! error TS8039: A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag
     * @property {T} a
                  ~
!!! error TS2304: Cannot find name 'T'.
     * @property {T} b
                  ~
!!! error TS2304: Cannot find name 'T'.
     */
    /**
     * @callback Call
     * @template T
        ~~~~~~~~
!!! error TS8039: A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag
     * @param {T} x
               ~
!!! error TS2304: Cannot find name 'T'.
     * @returns {T}
                 ~
!!! error TS2304: Cannot find name 'T'.
     */
    /**
     * @template T
     * @type {Call<T>}
              ~~~~~~~
!!! error TS2315: Type 'Call' is not generic.
                   ~
!!! error TS2304: Cannot find name 'T'.
     */
    const identity = x => x;
                     ~
!!! error TS7006: Parameter 'x' implicitly has an 'any' type.
    
    /**
     * @typedef Nested
     * @property {Object} oh
     * @property {number} oh.no
     * @template T
        ~~~~~~~~
!!! error TS8039: A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag
     * @property {string} oh.noooooo
     */
    
    
    /**
     * @overload
     * @template T
        ~~~~~~~~
!!! error TS8039: A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag
     * @template U
        ~~~~~~~~
!!! error TS8039: A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag
     * @param {T[]} array
               ~
!!! error TS2304: Cannot find name 'T'.
     * @param {(x: T) => U[]} iterable
                   ~
!!! error TS2304: Cannot find name 'T'.
                         ~
!!! error TS2304: Cannot find name 'U'.
     * @returns {U[]}
                 ~
!!! error TS2304: Cannot find name 'U'.
     */
    /**
     * @overload
     * @template T
        ~~~~~~~~
!!! error TS8039: A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag
     * @param {T[][]} array
               ~
!!! error TS2304: Cannot find name 'T'.
     * @returns {T[]}
                 ~
!!! error TS2304: Cannot find name 'T'.
     */
    /**
     * @param {unknown[]} array
     * @param {(x: unknown) => unknown} iterable
     * @returns {unknown[]}
     */
    function flatMap(array, iterable = identity) {
      /** @type {unknown[]} */
      const result = [];
      for (let i = 0; i < array.length; i += 1) {
        result.push(.../** @type {unknown[]} */(iterable(array[i])));
      }
      return result;
    }
    