diff --git a/package.json b/package.json index 5431bfb..6d411c8 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "@types/jest": "24.0.11", "@typescript-eslint/eslint-plugin": "^5.0.0", "@typescript-eslint/parser": "^5.0.0", - "axios": "0.18.0", + "axios": "^0.24.0", "babel-loader": "8.0.6", "body-parser": "1.18.3", "chokidar": "2.1.5", diff --git a/types/globals.d.ts b/types/globals.d.ts index 01b04b0..6dcba21 100644 --- a/types/globals.d.ts +++ b/types/globals.d.ts @@ -1,3 +1,4 @@ +import type { Method, AxiosRequestConfig } from 'axios'; interface Obj { [key: string]: any; } @@ -16,7 +17,7 @@ declare const Dec: { personal: { username: string; }; - reqByEncrypt: (method: string, url: string, data?: any, config?: Obj) => {}, + reqByEncrypt: (method: Method, url: string, data?: any, config?: AxiosRequestConfig) => {}, socketEmit: (type: string, name: string, callback: (re: any) => void) => void; // req reqGet: RequestFunction;