mathiasbynens/windows-1252

Typescript error in type declarations

JarnoRFB opened this issue · 2 comments

Hi, I am running node v16.13.2 and typescript v4.5.5.

After running installing with npm and trying to import the library, I get the following errors

node_modules/windows-1252/windows-1252.d.ts:9:10 - error TS1038: A 'declare' modifier cannot be used in an already ambient context.

9   export declare function encode(
           ~~~~~~~

node_modules/windows-1252/windows-1252.d.ts:13:10 - error TS1038: A 'declare' modifier cannot be used in an already ambient context.

13   export declare function decode(
            ~~~~~~~

Happy about any directions on how to fix this :)

Same issue here

The same here!
/node_modules/windows-1252/windows-1252.mjs:284
export const decode = (input, options) => {
^^^^^^

SyntaxError: Unexpected token 'export'