Skip to content

Commit 3eb1938

Browse files
committed
fix(types): 修复接口定义
1 parent a41a2aa commit 3eb1938

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/node-agile-client.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,12 @@ export async function init(options: Config) {
2727
}
2828
const beginTime = Date.now();
2929
// 生成请求头
30+
// @ts-ignore
3031
options.headers = generateAuthorization(options)
31-
if (options.debug) console.info({ message: '【agile】请求头:', data: options.headers })
32+
if (options.debug) {
33+
// @ts-ignore
34+
console.info({ message: '【agile】请求头:', data: options.headers })
35+
}
3236
// 初始化agile配置
3337
try {
3438
await initAgileConfig(options);
@@ -69,6 +73,7 @@ function getNotifications(options: Config) {
6973
try {
7074
const ws = new WS(wsPaths[index], {
7175
debug: !!options.debug,
76+
// @ts-ignore
7277
wsOptions: { headers: options.headers },
7378
})
7479
ws.websocketOnOpen(() => {
@@ -196,6 +201,7 @@ async function getAgileConfigPromise(options: Config): Promise<any> {
196201
const response = await axios.get(urlPaths[index], {
197202
timeout: options.httptimeout || 100000,
198203
headers: {
204+
// @ts-ignore
199205
...options.headers,
200206
},
201207
})

src/types/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ export interface Config {
1515
httptimeout?: number
1616
/** debug模式,打印更多信息 */
1717
debug?: boolean
18-
/** 头部 */
19-
headers: { Authorization: string; appid: string };
2018
}
2119

2220
export interface Data {

0 commit comments

Comments
 (0)