-
Notifications
You must be signed in to change notification settings - Fork 59
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
Separate internal APIs from public ones #568
Merged
puzpuzpuz
merged 27 commits into
hazelcast:master
from
puzpuzpuz:v4.0/enhancement/separate-public-apis
Aug 14, 2020
Merged
Separate internal APIs from public ones #568
puzpuzpuz
merged 27 commits into
hazelcast:master
from
puzpuzpuz:v4.0/enhancement/separate-public-apis
Aug 14, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also includes the following: * Fix typedoc flags * Exclude internal modules and members from tsc output * Exclude source maps from tsc output
* Also includes some improvements, like reformat, interface extraction, etc.
puzpuzpuz
changed the title
[WIP] Separate internal APIs from public ones
Separate internal APIs from public ones
Aug 11, 2020
mdumandag
reviewed
Aug 13, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I have some minor comments
@mdumandag it seems that I have addresses/replied to all pending comments. Could you take another look? |
mdumandag
approved these changes
Aug 14, 2020
harunalpak
pushed a commit
to harunalpak/hazelcast-nodejs-client
that referenced
this pull request
Dec 8, 2022
Includes the following: * Marks internal modules and class members with @internal tag which is supported by both tsc and typedoc * Fixes typedoc flags, so that it now ignores internal stuff * Excludes internal modules and members from tsc output * Excludes source maps from tsc output * Moves typings for long and bluebird into non-dev dependencies, as TS users need them (see hazelcast#537) * Adds test for declarations produced by tsc * Also includes some code improvements, like reformatting, interface extraction, etc.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes: #557
Closes: #555
Closes: #537
@internal
tag which is supported by both tsc and typedoc/** @ignore *//** */
. It's a known workaround for typedoclong
andbluebird
into non-dev dependencies, as TS users need them (see Include TS typings into client artifact #537)stripInternal
option there is a chance that, for instance, the declarations include an internal class and tsc will fail to compile user code because of thatnpm run validate-user-code
step to the Jenkins PR builderClient protocol counterpart PR: hazelcast/hazelcast-client-protocol#335
Results
As the result,
./lib
dir's size went down from 3MB to 1.4MB. API documentation also got a lot smaller and now includes public API only.Additional context
Ideally, we could ask typedoc to generate documentation only for modules reachable from the entry point (
./src/index.ts
). This way we would need much less@internal
tags and no/** @ignore *//** */
hacks. There is a pending PR for typedoc that implements such logic, yet it's experimental and not available in stable builds. So, that's why I have decided not to go with this road.