Skip to content

Commit

Permalink
fix: add type annotation to request module
Browse files Browse the repository at this point in the history
  • Loading branch information
maxjeffos committed Dec 13, 2020
1 parent cc73cc6 commit c25ab73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/request/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import request = require('./request');
import alerts = require('../alerts');
import { MetricsCollector } from '../metrics';
import * as needle from 'needle';

// A hybrid async function: both returns a promise and takes a callback
export = async (
payload: any,
callback?: (err: Error | null, res?, body?) => void,
) => {
): Promise<void | { res: needle.NeedleResponse; body: any }> => {
const totalNetworkTimeTimer = MetricsCollector.NETWORK_TIME.createInstance();
totalNetworkTimeTimer.start();
try {
Expand Down

0 comments on commit c25ab73

Please sign in to comment.