@w0s/report-js-error
Version:
Send script error information to endpoints
29 lines • 749 B
TypeScript
interface FetchParam {
documentURL: string;
message: string;
filename: string;
lineno: string;
colno: string;
}
export interface Option {
fetchParam: FetchParam;
fetchContentType?: 'application/x-www-form-urlencoded' | 'application/json';
fetchHeaders?: HeadersInit;
denyFilenames?: RegExp[];
allowFilenames?: RegExp[];
denyUAs?: RegExp[];
allowUAs?: RegExp[];
}
/**
* Send script error information to endpoints
*/
export default class {
#private;
/**
* @param endpoint - URL of the endpoint
* @param options - Information such as transmission conditions
*/
constructor(endpoint: string, options: Readonly<Option>);
}
export {};
//# sourceMappingURL=ReportJsError.d.ts.map