Closed IonelLupu closed 1 year ago
Hero doesn't manipulate any of the Javascript objects like String. I think this is just typescript deciding to downgrade the code compatibility standard. As to why... I don't have any idea. I'm not even sure we're publishing any typescript related files to npm besides the declaration files. Can you double check that your @ulixee /* npm modules don't include any tsconfig files? I'm fairly certain we're not publishing those, but worth checking
@IonelLupu Any update here?
hey @blakebyrnes
I check my node_modules and I found these tsconfig.json
files:
Does it fix your issue to remove those files?
Unfortunately, no.
I also tested by importing different modules from @ulixee
and it seems that only a few of the contain the problem:
Problem (@ulixee/hero-core
for example):
Not a problem (@ulixee/commons
is OK):
Can someone here post a working TypeScript project using this package? I can't for the life of me get the imports to work
Can someone here post a working TypeScript project using this package? I can't for the life of me get the imports to work
Can you start a new discussion or issue with your code and the error you're seeing? I don't think many people have reported issues except that they had to set skipLibCheck to true
Hello everyone. I discovered a very very strange issue. It seems Hero breaks the typescript compiler. For example, having this project setup, makes typescript throw an error:
Compiling this will result in this error: "Property 'replaceAll' does not exist on type"
But (and here is the weird part), if I comment the "import", the typescript compiler doesn't complain anymore:
Does anyone have any idea why is this happening?
To note that
replaceAll
is a ES2021 feature. It seems@ulixee/hero-playground
somehow removes this method from the String object. Is Hero updating the prototype of the String object?