Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealAgentK committed Oct 22, 2024
1 parent 1330c87 commit b634564
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
15 changes: 10 additions & 5 deletions lib/raygun.batch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ export class RaygunBatchTransport {

private batchId: number = 0;

private batchState: BatchState = { messages: [], messageSizeInBytes: 0 };
private batchState: BatchState = { messages: [],
messageSizeInBytes: 0 };

constructor(options: { interval: number; httpOptions: HTTPOptions }) {
constructor(options: { interval: number;
httpOptions: HTTPOptions; }) {
this.interval = options.interval;
this.httpOptions = options.httpOptions;
}
Expand Down Expand Up @@ -104,8 +106,10 @@ export class RaygunBatchTransport {
}

const promise = new Promise<IncomingMessage>((resolve, reject) => {
const promise = { resolve, reject };
this.batchState.messages.push({ serializedMessage, promise });
const promise = { resolve,
reject };
this.batchState.messages.push({ serializedMessage,
promise });
});

const batchIsFull = this.batchState.messages.length === 100;
Expand All @@ -130,7 +134,8 @@ export class RaygunBatchTransport {

this.sendBatch(batch);

this.batchState = { messages: [], messageSizeInBytes: 0 };
this.batchState = { messages: [],
messageSizeInBytes: 0 };

this.stopProcessing();
}
Expand Down
11 changes: 8 additions & 3 deletions lib/raygun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ import * as raygunSyncTransport from "./raygun.sync.transport";
import { v4 as uuidv4 } from "uuid";

type SendOptionsResult =
| { valid: true; message: Message; options: SendOptions; skip: boolean }
| { valid: false; message: Message };
| { valid: true;
message: Message;
options: SendOptions;
skip: boolean; }
| { valid: false;
message: Message; };

const debug = require("debug")("raygun");

Expand Down Expand Up @@ -562,7 +566,8 @@ class Raygun {
const apiKey = this._apiKey;

if (!apiKey) {
return { valid: false, message };
return { valid: false,
message };
}

return {
Expand Down

0 comments on commit b634564

Please sign in to comment.