mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Chore: improve types & performance
This commit is contained in:
@@ -23,7 +23,7 @@ export const processLine = (line: string): string | null => {
|
||||
return trimmed;
|
||||
};
|
||||
|
||||
export const processLineFromReadline = async (rl: AsyncGenerator<string> | ReadableStream<string>): Promise<string[]> => {
|
||||
export const processLineFromReadline = async (rl: AsyncIterable<string>): Promise<string[]> => {
|
||||
const res: string[] = [];
|
||||
for await (const line of rl) {
|
||||
const l: string | null = processLine(line);
|
||||
|
||||
Reference in New Issue
Block a user