Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a number of exports for ol.js.
Basically, I think we should export the getters of exported constructor options. For example, "origin" is an (exported) option of the (exported) ol.tilegrid.TileGrid constructor. So it feels right to export the getOrigin property of ol.tilegrid.TileGrid.prototype.
Also, even if ol.layer.Layer isn't directly used by application developers, I think we should export the ol.layer.Layer symbol. Application developers do manipulate layers. To me this is a sufficient reason for exporting the ol.layer.Layer symbol. For example, it will also application developers to do layer instanceof ol.layer.Layer.
I'm sure there are other places when the above principles should be applied. For now, I just wanted to run this by more people. If this PR is merged I'll do a more thorough review and open new PRs.
FYI, w/o the four commits this PR adds:
And w/ the four commits:
So the difference is 98 bytes (gzipped). Exports shouldn't cost much, as long as the symbols/properties we export are already used internally. In that case, the extra bytes are related to the aliases created only.