vitaly-t / iter-ops

Basic operations on iterables
https://vitaly-t.github.io/iter-ops
MIT License
136 stars 5 forks source link

Typedoc is failing to build documentation #245

Closed vitaly-t closed 2 months ago

vitaly-t commented 2 months ago

After the change, I saw a type-resolution issue within onEnd tests, which I fixed according to what it expected, but then typedoc stopped working, which apparently relies on running tsc, which fails for those tests also.

@RebeccaStevens Any idea why TSC is now failing, and how else that test can make use of type IIterationSummary?

If I roll the changes back, it looks like this:

image

i.e. it cannot see the type, though it works, and typedoc also builds, but in the current code, it looks correct, all valid, but typedoc fails because so does TSC. Any idea what it really should be?

This looks like a conflict between TSC compiler and the type changes, which only manifests when generating documentation, which relies on running TSC.

vitaly-t commented 2 months ago

I have reverted the test code into the master, because I need to be able to build documentation. In the meantime, I've noticed this issue isn't limited to onEnd operator. The same issue can be seen in tests for operator timing:

image

And the only way I can fix it, tsc and documentation both stop working.

RebeccaStevens commented 2 months ago

Sorry, I'm not sure I follow. So you're saying you can't build the docs? How are you building them? With yarn docs? That's working for me without issue.

vitaly-t commented 2 months ago

As per above, I reverted the code back to your own version, so I can build documentation, by running npm run doc.

But as you can see in the screenshots above, the IDE fails to understand tests for operators onEnd and timing, and so they come up in red. If it is an IDE issue somehow, it would be an odd one.

I can fix the issue by how types IIterationSummary and IValueTiming are used, but if do, and the IDE likes it, but then tsc and npm run doc both fail, and I cannot generate documentation.

vitaly-t commented 2 months ago

After a bit more playing with it, I think it may be an IDE issue after all, something with failing to pick up the types or linting issue, I'm not sure. But after restarting the IDE, I cannot see the issue again, which is quite odd.

Therefore, I'm just going to close this.

@RebeccaStevens Thank you for looking into this!