swc/crates/swc_ecma_parser/tests/tsc/checkJsdocParamOnVariableDeclaredFunctionExpression.ts

21 lines
317 B
TypeScript

// @allowJS: true
// @suppressOutputPathCheck: true
// @filename: 0.js
// @ts-check
/**
* @param {number=} n
* @param {string} [s]
*/
var x = function foo(n, s) {}
var y;
/**
* @param {boolean!} b
*/
y = function bar(b) {}
/**
* @param {string} s
*/
var one = function (s) { }, two = function (untyped) { };