From 1543685c48b96ea74bcd2d24cf0eb332d27e937d Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Sun, 17 Mar 2024 19:47:15 +0100 Subject: [PATCH] fix: types --- src/node.d.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/node.d.ts b/src/node.d.ts index af39cd0..3104153 100644 --- a/src/node.d.ts +++ b/src/node.d.ts @@ -1,24 +1,20 @@ -import { MqlError, MqlPayload, MqlOptions } from '../lightweight'; - +import { MqlPayload, MqlOptions } from '../lightweight'; export { MicrolinkError, MqlError, MqlPayload } from '../lightweight' import { Response, Options as GotOpts } from 'got/dist/source/core' -export type HTTPResponse = Response - -type HTTPResponseWithBody = HTTPResponse & { body: MqlPayload }; +type HTTPResponseWithBody = Response & { body: MqlPayload }; -type HTTPResponseRaw = HTTPResponse & { body: Buffer }; +type HTTPResponseRaw = Response & { body: Buffer }; export type MqlResponse = MqlPayload & { response: HTTPResponseWithBody }; interface Mql { - (url: string, opts?: MqlOptions & { stream: string }, gotOpts?: GotOpts): Promise; + (url: string, opts?: MqlOptions & { stream: string }, gotOpts?: GotOpts): Promise; (url: string, opts?: MqlOptions, gotOpts?: GotOpts): Promise; extend: (gotOpts?: GotOpts) => Mql; stream: (url: string, gotOpts?: GotOpts) => NodeJS.ReadableStream; buffer: (url: string, opts?: MqlOptions, gotOpts?: GotOpts) => Promise; - MicrolinkError: new (props: object) => MqlError; version: string; }