0.js(3,5): error TS2322: Type 'boolean' is not assignable to type 'string'.
0.js(6,5): error TS2322: Type 'string' is not assignable to type 'number'.
0.js(8,21): error TS1005: '}' expected.
0.js(9,13): error TS7006: Parameter 'a' implicitly has an 'any' type.
0.js(12,21): error TS1005: '}' expected.
0.js(13,13): error TS7006: Parameter 'a' implicitly has an 'any' type.
0.js(19,21): error TS1005: '}' expected.
0.js(20,13): error TS7006: Parameter 'a' implicitly has an 'any' type.
0.js(23,21): error TS1005: '}' expected.
0.js(24,13): error TS7006: Parameter 'a' implicitly has an 'any' type.


==== 0.js (10 errors) ====
    // @ts-check
    /** @type {String} */
    var S = true;
        ~
!!! error TS2322: Type 'boolean' is not assignable to type 'string'.
    
    /** @type {number} */
    var n = "hello";
        ~
!!! error TS2322: Type 'string' is not assignable to type 'number'.
    
    /** @type {function (number)} */
                        ~
!!! error TS1005: '}' expected.
    const x1 = (a) => a + 1;
                ~
!!! error TS7006: Parameter 'a' implicitly has an 'any' type.
    x1("string");
    
    /** @type {function (number): number} */
                        ~
!!! error TS1005: '}' expected.
    const x2 = (a) => a + 1;
                ~
!!! error TS7006: Parameter 'a' implicitly has an 'any' type.
    
    /** @type {string} */
    var a;
    a = x2(0);
    
    /** @type {function (number): number} */
                        ~
!!! error TS1005: '}' expected.
    const x3 = (a) => a.concat("hi");
                ~
!!! error TS7006: Parameter 'a' implicitly has an 'any' type.
    x3(0);
    
    /** @type {function (number): string} */
                        ~
!!! error TS1005: '}' expected.
    const x4 = (a) => a + 1;
                ~
!!! error TS7006: Parameter 'a' implicitly has an 'any' type.
    x4(0);