@types/update-notifier

  • Version 5.1.0
  • Published
  • 6.35 kB
  • 2 dependencies
  • MIT license

Install

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

Overview

TypeScript definitions for update-notifier

Index

Functions

function UpdateNotifier

UpdateNotifier: typeof UpdateNotifier;
  • Checks if there is an available update

Classes

class UpdateNotifier

class UpdateNotifier {}

    constructor

    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

            Interfaces

            interface NotifyOptions

            interface NotifyOptions {}

              property boxenOptions

              boxenOptions?: boxen.Options | 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 (1)

                          Dependencies (2)

                          Dev Dependencies (0)

                          No dev dependencies.

                          Peer Dependencies (0)

                          No peer dependencies.

                          Badge

                          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
                            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/update-notifier)
                          • 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>