mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Move types into a namespace
This commit is contained in:
parent
951ef11442
commit
e8127e09df
@ -1,4 +1,6 @@
|
||||
import ghauth, { AuthOptions, TokenData } from "ghauth";
|
||||
/// <reference types="node" />
|
||||
import ghauth = require("ghauth");
|
||||
import { AuthOptions, TokenData } from "ghauth";
|
||||
|
||||
// Full
|
||||
const authOptions1: AuthOptions = {
|
||||
|
||||
68
types/ghauth/index.d.ts
vendored
68
types/ghauth/index.d.ts
vendored
@ -3,43 +3,47 @@
|
||||
// Definitions by: Leko <https://github.com/Leko>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export interface AuthOptions {
|
||||
configName: string;
|
||||
declare function ghauth(authOptions: ghauth.AuthOptions, callback: (err: Error, tokenData: ghauth.TokenData) => void): void;
|
||||
|
||||
/**
|
||||
* @default false
|
||||
*/
|
||||
noSave?: boolean;
|
||||
declare namespace ghauth {
|
||||
interface AuthOptions {
|
||||
configName: string;
|
||||
|
||||
/**
|
||||
* @default "https://api.github.com/authorizations"
|
||||
*/
|
||||
authUrl?: string;
|
||||
/**
|
||||
* @default false
|
||||
*/
|
||||
noSave?: boolean;
|
||||
|
||||
/**
|
||||
* @default "GitHub"
|
||||
*/
|
||||
promptName?: string;
|
||||
/**
|
||||
* @default "https://api.github.com/authorizations"
|
||||
*/
|
||||
authUrl?: string;
|
||||
|
||||
/**
|
||||
* @default []
|
||||
*/
|
||||
scopes?: ReadonlyArray<string>;
|
||||
/**
|
||||
* @default "GitHub"
|
||||
*/
|
||||
promptName?: string;
|
||||
|
||||
/**
|
||||
* @default "Node.js command-line app with ghauth"
|
||||
*/
|
||||
note?: string;
|
||||
/**
|
||||
* @default []
|
||||
*/
|
||||
scopes?: ReadonlyArray<string>;
|
||||
|
||||
/**
|
||||
* @default "Magic Node.js application that does magic things with ghauth"
|
||||
*/
|
||||
userAgent?: string;
|
||||
/**
|
||||
* @default "Node.js command-line app with ghauth"
|
||||
*/
|
||||
note?: string;
|
||||
|
||||
/**
|
||||
* @default "Magic Node.js application that does magic things with ghauth"
|
||||
*/
|
||||
userAgent?: string;
|
||||
}
|
||||
|
||||
interface TokenData {
|
||||
user: string;
|
||||
token: string;
|
||||
}
|
||||
}
|
||||
|
||||
export interface TokenData {
|
||||
user: string;
|
||||
token: string;
|
||||
}
|
||||
|
||||
export default function ghauth(authOptions: AuthOptions, callback: (err: Error, tokenData: TokenData) => void): void;
|
||||
export = ghauth;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user