1.0.6 • Published 6 months ago

@types/auth-header v1.0.6

Weekly downloads
1,642
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/auth-header

Summary

This package contains type definitions for auth-header (https://github.com/izaakschroeder/auth-header).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/auth-header.

index.d.ts

// Type definitions for auth-header 1.0
// Project: https://github.com/izaakschroeder/auth-header
// Definitions by: ForbesLindesay <https://github.com/ForbesLindesay>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1

type Params =
    | Array<[string, string | ReadonlyArray<string>]>
    | {[key: string]: string | ReadonlyArray<string>};
export { Params };

export interface TokenOptions {
    scheme: string;
    token?: string | undefined;
    params?: Params | undefined;
}

export interface Token {
    scheme: string;
    params: {[key: string]: string | string[]};
    token: null | string | string[];
}

export function format(token: TokenOptions): string;
export function format(scheme: string, token?: string, params?: Params): string;

export function parse(header: string): Token;

Additional Details

  • Last updated: Wed, 07 Jul 2021 21:44:38 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by ForbesLindesay.