• Version 6.0.8
  • Published
  • 5.8 kB
  • 2 dependencies
  • MIT license


npm i @types/update-notifier
yarn add @types/update-notifier
pnpm add @types/update-notifier


TypeScript definitions for update-notifier



function updateNotifier

updateNotifier: (settings?: Settings) => UpdateNotifier;
  • Checks if there is an available update


class UpdateNotifier

class UpdateNotifier {}


    constructor(settings: Settings);

      property config

      readonly config?: any;

        property update

        readonly update?: UpdateInfo;

          method check

          check: () => void;

            method fetchInfo

            fetchInfo: () => UpdateInfo | Promise<UpdateInfo>;
            • Check update information

            method notify

            notify: (customMessage?: NotifyOptions) => void;
            • Convenience method to display a notification message


            interface NotifyOptions

            interface NotifyOptions {}

              property boxenOptions

              boxenOptions?: BoxenOptions | undefined;
              • Options object that will be passed to boxen See https://github.com/sindresorhus/boxen/blob/master/index.d.ts

              property defer

              defer?: boolean | undefined;
              • Defer showing the notification to after the process has exited

              property isGlobal

              isGlobal?: boolean | undefined;
              • Include the -g argument in the default message's npm i recommendation

              property message

              message?: string | undefined;
              • Message that will be shown when an update is available

              interface Package

              interface Package {}

                property name

                name: string;

                  property version

                  version: string;

                    interface Settings

                    interface Settings {}

                      property distTag

                      distTag?: string | undefined;
                      • Which dist-tag to use to find the latest version 'latest'

                      property packageName

                      packageName?: string | undefined;
                      • Deprecated

                        use pkg.name

                      property packageVersion

                      packageVersion?: string | undefined;
                      • Deprecated

                        use pkg.version

                      property pkg

                      pkg?: Package | undefined;

                        property shouldNotifyInNpmScript

                        shouldNotifyInNpmScript?: boolean | undefined;
                        • Allows notification to be shown when running as an npm script

                        property updateCheckInterval

                        updateCheckInterval?: number | undefined;
                        • How often to check for updates

                        interface UpdateInfo

                        interface UpdateInfo {}

                          property current

                          readonly current: string;
                          • Current version

                          property latest

                          readonly latest: string;
                          • Latest version

                          property name

                          name: string;
                          • Package name

                          property type

                          readonly type: 'latest' | 'major' | 'minor' | 'patch' | 'prerelease' | 'build';
                          • Type of current update

                          Package Files (2)

                          Dependencies (2)

                          Dev Dependencies (0)

                          No dev dependencies.

                          Peer Dependencies (0)

                          No peer dependencies.


                          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/update-notifier.

                          • Markdown
                          • HTML
                            <a href="https://www.jsdocs.io/package/@types/update-notifier"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>