ashtuchkin / iconv-lite

Convert character encodings in pure javascript.
MIT License
3.04k stars 282 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 6 months ago

creatxrgithub commented 6 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 6 months ago

or maybe it's better only use Uint8Array

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