forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
persona.d.ts
47 lines (39 loc) · 1.17 KB
/
persona.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Type definitions for Persona
// Project: http://www.mozilla.org/en-US/persona
// Definitions by: James Frasca <https://github.com/Nycto>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace Persona {
export interface WatchOptions {
loggedInUser: String
onlogin: (String) => void
onlogout: () => void
onready?: () => void
}
export interface RequestOptions {
backgroundColor?: String
siteName?: String
siteLogo?: String
termsOfService?: String
privacyPolicy?: String
returnTo?: String
oncancel?: () => void
}
export interface GetOptions {
backgroundColor?: String
siteName?: String
siteLogo?: String
termsOfService?: String
privacyPolicy?: String
}
export interface Persona {
watch( options: WatchOptions ): void
request( options: RequestOptions ): void
request(): void
logout(): void
get( gotAssertion: (String) => void ): void
get( gotAssertion: (String) => void, options: GetOptions ): void
}
}
interface Navigator {
id: Persona.Persona
}