diff --git a/lightweight/index.d.ts b/lightweight/index.d.ts index 178fd6f..7ef7842 100644 --- a/lightweight/index.d.ts +++ b/lightweight/index.d.ts @@ -150,9 +150,6 @@ export type MqlPayload = { data: MqlResponseData; statusCode: number; headers: { [key: string]: string }; - more?: string, - code?: string, - url?: string } export type MqlResponse = MqlPayload & { @@ -164,6 +161,16 @@ export type MqlResponse = MqlPayload & { }; } +export type MqlError = { + headers: { [key: string]: string }; + name: string; + message: string; + status: MqlStatus; + code: string; + more: string; + url: string; +} + declare function mql( url: string, opts?: MqlOptions & MicrolinkApiOptions, diff --git a/src/node.d.ts b/src/node.d.ts index c7b7506..fdc76c4 100644 --- a/src/node.d.ts +++ b/src/node.d.ts @@ -1,6 +1,6 @@ import { MqlPayload, MqlOptions, MicrolinkApiOptions } from '../lightweight' -export { MqlPayload } from '../lightweight' +export { MqlError, MqlPayload } from '../lightweight' export type MqlResponse = MqlPayload & { response: {