otp-code-component
Version:
Google Authenticator 验证组件
113 lines (112 loc) • 4.59 kB
TypeScript
/* eslint-disable */
/* tslint:disable */
/**
* This is an autogenerated file created by the Stencil compiler.
* It contains typing information for all components that exist in this project.
*/
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
import { AuthErrorResponse, AuthSuccessResponse, AuthType } from "./components/google-auth/types";
export { AuthErrorResponse, AuthSuccessResponse, AuthType } from "./components/google-auth/types";
export namespace Components {
interface GoogleAuth {
"accessToken": string;
"getQrcodeUrl": string;
"phone"?: string;
/**
* @default 'google'
*/
"type": AuthType;
"verifyCodeUrl": string;
}
interface MyComponent {
/**
* The first name
*/
"first": string;
/**
* The last name
*/
"last": string;
/**
* The middle name
*/
"middle": string;
}
}
export interface GoogleAuthCustomEvent<T> extends CustomEvent<T> {
detail: T;
target: HTMLGoogleAuthElement;
}
declare global {
interface HTMLGoogleAuthElementEventMap {
"authSuccess": AuthSuccessResponse;
"authError": AuthErrorResponse;
"authBound": void;
}
interface HTMLGoogleAuthElement extends Components.GoogleAuth, HTMLStencilElement {
addEventListener<K extends keyof HTMLGoogleAuthElementEventMap>(type: K, listener: (this: HTMLGoogleAuthElement, ev: GoogleAuthCustomEvent<HTMLGoogleAuthElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof HTMLGoogleAuthElementEventMap>(type: K, listener: (this: HTMLGoogleAuthElement, ev: GoogleAuthCustomEvent<HTMLGoogleAuthElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
}
var HTMLGoogleAuthElement: {
prototype: HTMLGoogleAuthElement;
new (): HTMLGoogleAuthElement;
};
interface HTMLMyComponentElement extends Components.MyComponent, HTMLStencilElement {
}
var HTMLMyComponentElement: {
prototype: HTMLMyComponentElement;
new (): HTMLMyComponentElement;
};
interface HTMLElementTagNameMap {
"google-auth": HTMLGoogleAuthElement;
"my-component": HTMLMyComponentElement;
}
}
declare namespace LocalJSX {
interface GoogleAuth {
"accessToken"?: string;
"getQrcodeUrl"?: string;
"onAuthBound"?: (event: GoogleAuthCustomEvent<void>) => void;
"onAuthError"?: (event: GoogleAuthCustomEvent<AuthErrorResponse>) => void;
"onAuthSuccess"?: (event: GoogleAuthCustomEvent<AuthSuccessResponse>) => void;
"phone"?: string;
/**
* @default 'google'
*/
"type"?: AuthType;
"verifyCodeUrl"?: string;
}
interface MyComponent {
/**
* The first name
*/
"first"?: string;
/**
* The last name
*/
"last"?: string;
/**
* The middle name
*/
"middle"?: string;
}
interface IntrinsicElements {
"google-auth": GoogleAuth;
"my-component": MyComponent;
}
}
export { LocalJSX as JSX };
declare module "@stencil/core" {
export namespace JSX {
interface IntrinsicElements {
"google-auth": LocalJSX.GoogleAuth & JSXBase.HTMLAttributes<HTMLGoogleAuthElement>;
"my-component": LocalJSX.MyComponent & JSXBase.HTMLAttributes<HTMLMyComponentElement>;
}
}
}