@types/persona
TypeScript icon, indicating that this package has built-in type declarations

0.0.32 • Public • Published

Installation

npm install --save @types/persona

Summary

This package contains type definitions for persona (http://www.mozilla.org/en-US/persona).

Details

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

index.d.ts

declare namespace Persona {
    export interface WatchOptions {
        loggedInUser: string;
        onlogin: (s: string) => void;
        onlogout: () => void;
        onready?: (() => void) | undefined;
    }

    export interface RequestOptions {
        backgroundColor?: string | undefined;
        siteName?: string | undefined;
        siteLogo?: string | undefined;
        termsOfService?: string | undefined;
        privacyPolicy?: string | undefined;
        returnTo?: string | undefined;
        oncancel?: (() => void) | undefined;
    }

    export interface GetOptions {
        backgroundColor?: string | undefined;
        siteName?: string | undefined;
        siteLogo?: string | undefined;
        termsOfService?: string | undefined;
        privacyPolicy?: string | undefined;
    }

    export interface Persona {
        watch(options: WatchOptions): void;
        request(options: RequestOptions): void;
        request(): void;
        logout(): void;
        get(gotAssertion: (s: string) => void): void;
        get(gotAssertion: (s: string) => void, options: GetOptions): void;
    }
}

interface Navigator {
    id: Persona.Persona;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by James Frasca.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/persona

Weekly Downloads

868

Version

0.0.32

License

MIT

Unpacked Size

4.84 kB

Total Files

5

Last publish

Collaborators

  • types