-
Notifications
You must be signed in to change notification settings - Fork 14
Fix type replacement issues #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix type replacement issues #10
Conversation
fe33e65
to
ffd1b31
Compare
ffd1b31
to
206cd73
Compare
The second commit corrects an error where parts of types were matched. |
This PR seems to have problems with @fires |
I have it fixed mostly, but there is still the problem that many event links point to apidoc/module-ol_events_Event-Event.html which does not get generated. See https://openlayers.org/en/latest/apidoc/module-ol_events_Event-BaseEvent.html and https://openlayers.org/en/latest/apidoc/module-ol_events_Event-Event.html As these two documents only differ in one detail ( Could it be that the file is somehow a leftover from a previous generation? If that is the case, many types need to be changed from Event to BaseEvent. This is not covered by typecheck because BaseEvent is a default export and always gets named BaseEvent. I personally try to avoid default exports all together because it tends to get messy. But this is no change that could be done before v7. So another way to solve this is in the jsdoc generation to first find out the real class names of every default export and afterwards change all the types accordingly. That means to iterate over the files two times. |
e792eae
to
4dafc0e
Compare
4dafc0e
to
b46e436
Compare
Yes, this is the case. Our website generation process only overwrites files, but does not remove any. So it is better to debug this locally. There is only
This would be the preferred way. But as things are currently related to TypeScript 3.7, a (fragile) workaround would be to name the imports accordingly in OpenLayers. See https://github.com/openlayers/openlayers/pull/10061/files#diff-079b05a573d5011f09c95c02d280ef16 |
OK, if this does not occur elsewhere this would fix it. I will look into it. |
Iterate through the comments two times. First collecting all identifiers and then replace them properly.
This fixes openlayers/openlayers#10049