refactor(service-worker): public API/docs fixes and minor refactoring#23138
refactor(service-worker): public API/docs fixes and minor refactoring#23138gkalpak wants to merge 3 commits intoangular:masterfrom
Conversation
aed1cdb to
9dae264
Compare
|
You can preview 17e5de9 at https://pr23138-17e5de9.ngbuilds.io/. |
There was a problem hiding this comment.
This is unnecessary, just mark the constructors @internal instead.
There was a problem hiding this comment.
IIRC, marking the constructor as @internal converts the class to an interface (in the API docs).
And interfaces can't be used as injection tokens (while abstract classes can), so I thought it would be confusing for users (not realizing they can use SwPush as an injection token even if it shows up as an interface in the docs).
But happy to change it @internal constructor if you feel strongly about it.
There was a problem hiding this comment.
Discussed offline:
We'll leave the constructors for now, since this is a general problem throughout the framework.
(Hopefully there will be a better solution in the near future.)
9dae264 to
31359f9
Compare
|
You can preview 31359f9 at https://pr23138-31359f9.ngbuilds.io/. |
|
Updated as discussed and rebased on master. PTAL, @alxhub. |
31359f9 to
75e7a34
Compare
|
You can preview 75e7a34 at https://pr23138-75e7a34.ngbuilds.io/. |
IgorMinar
left a comment
There was a problem hiding this comment.
thanks for the cleanup!
|
caretaker note: no google3 impact |
|
@gkalpak FYI: swupdate is mentioned in 3 places in the guides. If it's not part of the public API, we'll need to rewrite those sections. |
|
@jenniferfell it is. but we haven't made any change that would modify the previously exposed public api. This PR only reexports two interfaces that were previously not exported by mistake. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
PR Checklist
Tests for the changes have been added (for bug fixes / features)PR Type
What is the current behavior?
NgswCommChannel,UpdateAvailableEvent,UpdateActivatedEventare mentioned in the docs without being part of the public API.The constructors of
SwPush/SwUpdateare shown in the docs, making it look like they could be manually constructed.What is the new behavior?
UpdateAvailableEvent,UpdateActivatedEventare added to the public API.SwPush/SwUpdateare changed to abstract classes, so their constructors (including theNgswCommChannel) are not shown in the docs.Does this PR introduce a breaking change?