httplog/dist/index.d.ts

21 lines
606 B
TypeScript
Raw Normal View History

2024-07-08 15:59:39 +00:00
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