35 lines
934 B
TypeScript
35 lines
934 B
TypeScript
/// <reference types="vite/client" />
|
|
|
|
// Google Identity Services 类型声明
|
|
interface GoogleAccounts {
|
|
accounts: {
|
|
id: {
|
|
initialize: (config: {
|
|
client_id: string
|
|
auto_select?: boolean
|
|
callback: (response: { credential: string }) => void
|
|
ux_mode?: 'popup' | 'redirect'
|
|
itp_support?: boolean
|
|
}) => void
|
|
renderButton: (element: Element | null, config: {
|
|
type?: 'standard' | 'icon'
|
|
shape?: 'rectangular' | 'pill' | 'circle' | 'square'
|
|
theme?: 'outline' | 'filled_blue' | 'filled_black'
|
|
size?: 'large' | 'medium' | 'small'
|
|
logo_alignment?: 'left' | 'center'
|
|
}) => void
|
|
}
|
|
oauth2: {
|
|
initTokenClient: (config: {
|
|
client_id: string
|
|
callback: (response: { access_token: string }) => void
|
|
scope?: string
|
|
}) => void
|
|
}
|
|
}
|
|
}
|
|
|
|
interface Window {
|
|
google?: GoogleAccounts
|
|
isAddGmail?: boolean
|
|
} |