Skip to content

Commit

Permalink
chore: upgrade to ts 4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
oceanroleplay committed Nov 18, 2021
1 parent 59e63ee commit 6eddaad
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@
"eslint": "^8.2.0",
"prettier": "^2.4.1",
"ts-node": "^10.4.0",
"typescript": "^4.4.4"
"typescript": "^4.5.2"
}
}
10 changes: 5 additions & 5 deletions src/client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import {
IAIREP,
IAVT7Metar,
Expand Down Expand Up @@ -141,11 +140,12 @@ export class Client {
? IGAirMet[]
: T extends IStationOptions
? IStation[]
: unknown
: never
> {
const res = await axios.get<any, any>(Client.api.AW, {
const res = await axios.get(Client.api.AW, {
params: { ...options, requestType: "retrieve", format: "xml" },
});

if (this.options?.debug) {
console.log("API Response\n\n", res.data, "\n\n\n");
}
Expand All @@ -165,11 +165,11 @@ export class Client {

// final output
if (!finalData) {
return [];
return [] as never;
}

const output = finalData instanceof Array ? finalData : [finalData];
return this.FormatOutput(options.datasource, output);
return this.FormatOutput(options.datasource, output) as never;
}

AVT7 = async (AirportCode: string): Promise<IAVT7Metar> => {
Expand Down

0 comments on commit 6eddaad

Please sign in to comment.