Skip to content

Commit

Permalink
fix: add missing return types so typescript will compile
Browse files Browse the repository at this point in the history
when running npm run start (which runs tsc) it reports errors due to missing or incorrect return
types
  • Loading branch information
sam-super committed Jan 2, 2025
1 parent 3ed95f9 commit fbd390a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/interceptors/ClientRequest/agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class MockAgent extends http.Agent {
this.onResponse = options.onResponse
}

public createConnection(options: any, callback: any) {
public createConnection(options: any, callback: any): net.Socket {
const createConnection =
(this.customAgent instanceof http.Agent &&
this.customAgent.createConnection) ||
Expand Down Expand Up @@ -64,7 +64,7 @@ export class MockHttpsAgent extends https.Agent {
this.onResponse = options.onResponse
}

public createConnection(options: any, callback: any) {
public createConnection(options: any, callback: any): net.Socket {
const createConnection =
(this.customAgent instanceof https.Agent &&
this.customAgent.createConnection) ||
Expand Down
2 changes: 1 addition & 1 deletion src/interceptors/XMLHttpRequest/utils/createEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function createEvent(
target: XMLHttpRequest | XMLHttpRequestUpload,
type: string,
init?: ProgressEventInit
): EventPolyfill {
): EventPolyfill | ProgressEvent {
const progressEvents = [
'error',
'progress',
Expand Down

0 comments on commit fbd390a

Please sign in to comment.