Recently, I encountered an issue with my open-source library called Firemodel. The library utilizes ES classes and getters/setters within those classes. Everything was working smoothly until my VueJS frontend code started flagging every instance of these getters/setters as errors.
Here's a glimpse of how the error appears:
https://i.stack.imgur.com/Zs8Xn.png
Upon inspecting the d.ts
file in vs-code, the error is clearly highlighted. However, when I checked the same transpiled file from the Firemodel repository using vs-code, no error was detected.
Interestingly, when I transpile using tsc with Firemodel, no errors are reported. Even a consumer of Firemodel that also uses tsc for transpilation does not encounter any issues with Firemodel's generated *.d.ts
files. On the other hand, the VueJS project, which relies on the default settings of Vue CLI, fails to build due to these errors as it uses Babel for transpilation.
This situation has led me to suspect that Babel might be the root cause, but I'm uncertain. Has anyone else faced this issue before? Any thoughts or suggestions?