// TextEncoder/TextDecoder exist in every target (browsers, Node, workers) but // belong to the DOM and Node type libraries, which this package does not load // on purpose. Declared here to the extent the codec uses them. declare class TextDecoder { constructor(label?: string, options?: { fatal?: boolean; ignoreBOM?: boolean }); decode(input?: Uint8Array): string; } declare class TextEncoder { encode(input?: string): Uint8Array; }