npm.io
3.2.5 • Published 2 years ago

@types/ghauth

Licence
MIT
Version
3.2.5
Deps
0
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/ghauth

Summary

This package contains type definitions for ghauth (https://github.com/rvagg/ghauth).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ghauth.

index.d.ts

declare function ghauth(
    authOptions: ghauth.AuthOptions,
    callback: (err: Error, tokenData: ghauth.TokenData) => void,
): void;

declare namespace ghauth {
    interface AuthOptions {
        configName: string;

        /**
         * @default false
         */
        noSave?: boolean | undefined;

        /**
         * @default "https://api.github.com/authorizations"
         */
        authUrl?: string | undefined;

        /**
         * @default "GitHub"
         */
        promptName?: string | undefined;

        /**
         * @default []
         */
        scopes?: readonly string[] | undefined;

        /**
         * @default "Node.js command-line app with ghauth"
         */
        note?: string | undefined;

        /**
         * @default "Magic Node.js application that does magic things with ghauth"
         */
        userAgent?: string | undefined;
    }

    interface TokenData {
        user: string;
        token: string;
    }
}

export = ghauth;

Additional Details

  • Last updated: Mon, 20 Nov 2023 2324 GMT
  • Dependencies: none

Credits

These definitions were written by Leko.