httplog/dist/index.d.ts
Anton Nesterov 109994db57 init
2024-07-08 18:01:12 +02:00

21 lines
606 B
TypeScript

export type Event = Record<string, string | string[]>;
export interface IHTTPLogger {
log(event: string, ...tags: string[]): void;
}
export type HTTPLoggerOptions = {
url: string;
bufferSize?: number;
throttle?: number;
fetch?: typeof fetch;
getMetadata?: () => Event;
};
declare class HTTPLog implements IHTTPLogger {
#private;
constructor({ url, bufferSize, throttle, fetch, getMetadata, }: HTTPLoggerOptions);
log(event: string, ...tags: string[]): Promise<void>;
}
declare global {
var HTTPLogger: typeof HTTPLog;
}
export {};
//# sourceMappingURL=index.d.ts.map