-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Do not include oli.* symbols in the API documentation #2072
Conversation
Looking at ab10e05 again, I think we can even move |
Yes, I'm interested to have a look at this. |
Ok I'll have a look when I can. I may have questions rather than pertinent comments :) |
@elemoine Just a reminder in case you forgot about this. |
Thanks for the reminder @ahocevar. I think it's ok. But I also think we should treat the event types (e.g. ol.CollectionEvent) and ol.FrameState (and ol.View2DState) in a similar way. This means we should define an ol.FrameState constructor in the library that inherits from an oli.FrameState interface defined in the oli.js externs. In olx.js we define types for options objects created by application/external code, and nothing else. Things that the library creates itself and that shouldn't be renamed are defined and documented in the library code, and interfaces are defined in oli.js to prevent renaming. I hope it makes sense. |
Not sure I understand. The different between the events (e.g. ol.CollectionEvent) and ol.FrameState/ol.View2DState is that the former are classes, whereas the latter are object literals. Changing ol.FrameState and ol.View2DState from object literals to classes would add unnecessary overhead I think. |
I was suggesting to make ol.FrameState and ol.View2DState constructors for consistency with the event types. I do not see why they'd be treated differently.
Is doing |
No need to change this now. I'm fine with moving ol.FrameState and ol.View2DState to olx.js (maybe in a clearly identified section). |
Thanks @elemoine. I updated externs/olx.js to have all library defined object literals in their own section. |
Cool. Thanks. Please merge. |
Instead, object literals with properties that should not be renamed can go in externs/olx.js.
One more thing. As discussed with @tschaub, I also moved the |
Instead, make sure that the properties are documented in the implementing class.
I think I addressed everything now, also what was discussed in the hangout today. |
Looks good to me. |
Do not include oli.* symbols in the API documentation
Instead, document exported symbols in their ol.* counterparts. This is a possible solution to an issue discussed in #2068 (comment).
With this change, all oli.* documentation goes away, except for oli.FrameState, which is not documented elsewhere.