Chore: minor changes

This commit is contained in:
SukkaW
2023-11-17 21:36:09 +08:00
parent f88c3648a2
commit a5e36a1cd8
10 changed files with 51 additions and 50 deletions

View File

@@ -56,7 +56,6 @@ export async function* createReadlineInterfaceFromResponse(resp: Response): Asyn
}
}
export async function fetchRemoteTextAndCreateReadlineInterface(url: string | URL, opt?: RequestInit): Promise<AsyncGenerator<string>> {
const resp = await fetchWithRetry(url, opt);
return createReadlineInterfaceFromResponse(resp);
export function fetchRemoteTextAndCreateReadlineInterface(url: string | URL, opt?: RequestInit): Promise<AsyncGenerator<string>> {
return fetchWithRetry(url, opt).then(res => createReadlineInterfaceFromResponse(res));
}