ashtuchkin / iconv-lite

Convert character encodings in pure javascript.
MIT License
3.08k stars 281 forks source link

to support in browser it's better modify the type declaration Buffer to Buffer | Uint8Array in index.d.ts #318

Open creatxrgithub opened 10 months ago

creatxrgithub commented 10 months ago

to support in browser it's better modify the type declaration Buffer | Uint8Array to Uint8Array in index.d.ts

e.g. replace all to Buffer | Uint8Array

export function decode(buffer: Buffer | Uint8Array, encoding: string, options?: Options): string;
creatxrgithub commented 10 months ago

or maybe it's better only use Uint8Array

https://github.com/ashtuchkin/iconv-lite/issues/235