UNPKG

@funkit/connect

Version:

Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.

39 lines (38 loc) 1.6 kB
declare class FunLogger { protected apiKey: string | null; protected isDebugMode: boolean; protected userId: string | null; protected userAddress: string | null; protected userName: string | null; protected userLoginType: string | null; protected sdkVersion: string | null; constructor(); private getFunLogEnv; private logDataDog; private onDebug; private onInfo; private onWarn; private onError; private extractError; /**======================== * PUBLIC LOGGER FUNCTIONS *=========================*/ log(title: string, data?: object): void; info(title: string, data?: object): void; debug(title: string, data?: object): void; warn(title: string, data?: object): void; /** * @param errorOrData - * Previously was called "error" but since in the {@link Logger} interface, error is defined as object (which is the same thing as "any"), we treat it as of unknown type here for safety. * In a lot of places it's actually being used as a "data" prop, which also usually has an `.error` property representing an actual {@link Error} object. */ error(title: string, errorOrData: unknown, _data?: object): void; configure(apiKey: string | null, isDebug: boolean, sdkVersion: string): void; getUserId(): string | null; getUserAddress(): string | null; getUserName(): string | null; getUserLoginType(): string | null; setUserInfo(userId: string, userAddress: string, userName: string, userLoginType: string): void; } declare const logger: FunLogger; export { logger };