Closed
Description
// @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: a.js
// from util
/** @param {function} ctor - A big long explanation follows */
exports.inherits = require('inherits') // shouldn't error -- there is no function to check here
Expected behavior:
No error -- the external documentation for util.inherits
is written on the export of the internal implementation of it. This is fine. Perhaps the compiler should require the type of the initializer to have a signature with a parameter named ctor
, but right now it just looks at the syntax.
Actual behavior:
An error that inherits
has no parameter named ctor
.