2017-05-24 01:11:23 +02:00
|
|
|
|
// @allowJS: true
|
|
|
|
|
// @suppressOutputPathCheck: true
|
|
|
|
|
|
|
|
|
|
// @filename: 0.js
|
|
|
|
|
// @ts-check
|
2017-05-26 20:20:57 +02:00
|
|
|
|
/** @type {String} */
|
|
|
|
|
var S = true;
|
|
|
|
|
|
|
|
|
|
/** @type {number} */
|
|
|
|
|
var n = "hello";
|
2017-05-24 01:11:23 +02:00
|
|
|
|
|
|
|
|
|
/** @type {function (number)} */
|
|
|
|
|
const x1 = (a) => a + 1;
|
|
|
|
|
x1("string");
|
|
|
|
|
|
|
|
|
|
/** @type {function (number): number} */
|
|
|
|
|
const x2 = (a) => a + 1;
|
|
|
|
|
|
|
|
|
|
/** @type {string} */
|
|
|
|
|
var a;
|
2017-05-26 20:20:57 +02:00
|
|
|
|
a = x2(0);
|
|
|
|
|
|
|
|
|
|
/** @type {function (number): number} */
|
2017-06-09 01:44:42 +02:00
|
|
|
|
const x3 = (a) => a.concat("hi");
|
|
|
|
|
x3(0);
|
|
|
|
|
|
|
|
|
|
/** @type {function (number): string} */
|
|
|
|
|
const x4 = (a) => a + 1;
|
|
|
|
|
x4(0);
|