simple-update-notifier
simple-update-notifier copied to clipboard
Incorrect default export
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 use export = instead of export default.
See https://arethetypeswrong.github.io/?p=simple-update-notifier%402.0.0
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;