i18next / i18next-parser

Parse your code to extract translation keys/values and manage your catalog files
MIT License
486 stars 198 forks source link

TS type error in 8.2.0+ #868

Closed danielrentz closed 1 year ago

danielrentz commented 1 year ago

🐛 Bug Report

Using the lib with TS immediately fails with a type error.

To Reproduce

node_modules/i18next-parser/dist/index.d.ts:86:36 - error TS2552: Cannot find name 'RegEx'. Did you mean 'RegExp'?

86   keepRemoved?: boolean | readonly RegEx[];
                                      ~~~~~

  node_modules/typescript/lib/lib.es5.d.ts:1064:13
    1064 declare var RegExp: RegExpConstructor;
                     ~~~~~~
    'RegExp' is declared here.

Introduced here: https://github.com/i18next/i18next-parser/commit/217635a8e63725a74f081d8697ae16d0657014c4

Expected behavior

No type error.

Your Environment