* No error for require Still errors for module and exports, and require's type is now incorreclty 'any'; I broke module resolution somehow. Needs investigation. * module/exports symbols+update isCommonJsRequire Everything passes the tests but the code can be improved * Update baselines * Cleanup * Update baselines of new tests * Get rid of exports symbol It wasn't doing anything anyway.
21 lines
393 B
TypeScript
21 lines
393 B
TypeScript
// @noEmit: true
|
|
// @allowJs: true
|
|
// @checkJs: true
|
|
// @noImplicitAny: true
|
|
// @Filename: mod.js
|
|
|
|
/** @param {number} n */
|
|
exports.f = exports.g = function fg(n) {
|
|
return n + 1
|
|
}
|
|
/** @param {string} mom */
|
|
module.exports.h = module.exports.i = function hi(mom) {
|
|
return `hi, ${mom}!`;
|
|
}
|
|
|
|
// @Filename: use.js
|
|
var mod = require('./mod');
|
|
mod.f('no')
|
|
mod.g('also no')
|
|
mod.h(0)
|
|
mod.i(1)
|