Open nicojs opened 3 months ago
Current workaround:
import updateNotifierModule from 'simple-update-notifier';
/** @ts-expect-error: The types are wrong, see https://github.com/alexbrazier/simple-update-notifier/issues/29 */
const updateNotifier: typeof updateNotifierModule.default = updateNotifierModule;
The resolved types use export default where the JavaScript file appears to use
module.exports =.
This will cause TypeScript under the node16 module mode to think an extra .default property access is required, but that will likely fail at runtime. These types should useexport =
instead of export default.See https://arethetypeswrong.github.io/?p=simple-update-notifier%402.0.0