mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Perf: avoid spread operator
This commit is contained in:
@@ -2,4 +2,4 @@ export const SHARED_DESCRIPTION = [
|
||||
'License: AGPL 3.0',
|
||||
'Homepage: https://ruleset.skk.moe',
|
||||
'GitHub: https://github.com/SukkaW/Surge'
|
||||
] as const;
|
||||
];
|
||||
|
||||
@@ -26,7 +26,7 @@ export async function compareAndWriteFile(span: Span, linesA: string[], filePath
|
||||
let index = 0;
|
||||
|
||||
for await (const lineB of readFileByLine(file)) {
|
||||
const lineA = linesA[index];
|
||||
const lineA = linesA[index] as string | undefined;
|
||||
index++;
|
||||
|
||||
if (lineA == null) {
|
||||
|
||||
@@ -28,7 +28,7 @@ export class PolyfillTextDecoderStream extends TransformStream<Uint8Array, strin
|
||||
) {
|
||||
const decoder = new TextDecoder(encoding, { fatal, ignoreBOM });
|
||||
|
||||
const nonLastChunkDecoderOpt: TextDecodeOptions = { stream: true };
|
||||
const nonLastChunkDecoderOpt = { stream: true };
|
||||
|
||||
super({
|
||||
transform(chunk: Uint8Array, controller: TransformStreamDefaultController<string>) {
|
||||
|
||||
Reference in New Issue
Block a user