fix: types - #233
fix: types#233brettz9 wants to merge 1 commit into
Conversation
|
Hi Brett, Thanks for mentioning the TypeScript problems back upstream, and being clear about the provenance of these suggestions. A great reminder for me to test with TypeScript and that I can't just trust my ESM conversion code! Rather than directly merging this PR, I will add necessary changes to fix the TypeScript problems, while retaining backwards compatibility. I will still credit your report! |
|
You can track progress for this in the |
|
Excellent, thanks! Look forward to it... |
|
If possible, when you're available please could you test the current contents of the branch as generated by My two tests build fine so I'm quite confident it's OK. However, my patch differs from yours in several ways, for backwards compatibility, fixing more bugs I found, and avoiding unnecessary string replacements that could make bugs in the ESM version harder to track back to the initial code. Sorry for the inconvenience, but this is why I would love another test and feedback from you. If you cannot, it's fine - just let me know and I will release a patch release that can be superseded if necessary. |
|
I'm pretty sure I fixed both those errors; maybe:
Try these commands in order; my fixes aren't on NPM yet: cd node_modules/@webcoder49
mv code-input code-input.bak
git clone https://github.com/WebCoder49/code-input code-input
cd code-input
git checkout typescript-tests
cd esm
node generate.mjs # or sh generate.sh
cd ../../../../
tscWhen I've released the fixes to NPM you'll need to run this to revert to the official library: then run NPM update as usual. |
|
(Sorry for this annoying method; I want to know the fix is correct before I officially release it.) If it works, get back to me and I should be able to release the library in the next 12 hours. |
|
Ugh, my apologies, I had forgotten that step. Indeed it now works... |
|
Do you mean the compilation now fully works? If so, I can release the fix on NPM now! |
|
Yes, no tsc errors... |
|
Maybe I should wait for you to check the code also runs properly... |
|
Yeah, sorry, that is also looking good, too! |
|
That's great. I accidentally put some unrelated breaking changes in the There's probably no need to test compilation without them - I don't see how the presence of those breaking changes would cause any difference to the compilation bugs. |
|
My automated compilation tests work fine with the |
|
GitHub, NPM, and the website are all updated to the new release now (and I am going to sleep). Thank you for your time! |
|
(version 2.8.4) |
|
Thanks--working like a charm both in functionality and types! |

Hi,
Thank you for your library!
I was facing some TypeScript problems when including your library without
skipLibCheck. AI came up with the attached PR.