mirror of
https://github.com/SukkaW/Surge.git
synced 2026-02-01 11:31:54 +08:00
Chore: improve types & performance
This commit is contained in:
@@ -21,7 +21,7 @@ export class PolyfillTextDecoderStream extends TransformStream<Uint8Array, strin
|
||||
readonly ignoreBOM: boolean;
|
||||
|
||||
constructor(
|
||||
encoding: Encoding = 'utf-8',
|
||||
encoding: Bun.Encoding = 'utf-8',
|
||||
{ fatal = false, ignoreBOM = false }: ConstructorParameters<typeof TextDecoder>[1] = {}
|
||||
) {
|
||||
const decoder = new TextDecoder(encoding, { fatal, ignoreBOM });
|
||||
|
||||
Reference in New Issue
Block a user