init(config)
2.0.0及以上版本插件使用init配置各种属性,例如apikey
fundebug.init({
apikey: "API-KEY"
});
TypeScript
init方法的TypeScript定义如下:
export function init(config: IConfigs): undefined;
interface IConfigs {
apikey: string;
appversion?: string;
releasestage?: string;
user?: IUser;
metaData?: object;
callback?: ICallback;
setHttpBody?: boolean;
httpTimeout?: number;
filters?: object[];
silent?: boolean;
silentDev?: boolean;
silentResource?: boolean;
silentHttp?: boolean;
silentWebsocket?: boolean;
silentConsole?: boolean;
silentPerformance?: boolean;
sampleRate?: number;
domain?: string;
}