-
Notifications
You must be signed in to change notification settings - Fork 9
[MMB-156] Prepare for adding documentation comments #197
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
Merged
lawrence-forooghian
merged 18 commits into
main
from
prepare-for-documentation-comments
Oct 16, 2023
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
473ca77
Remove unused type `Provider`
lawrence-forooghian 8295f04
Make naming of event map types consistent
lawrence-forooghian 9f9ff98
Mark non-public API where we haven’t already
lawrence-forooghian 9dc816c
Export all types that are referenced by exported types
lawrence-forooghian 3b78093
Extract a couple of events to their own types
lawrence-forooghian 38f153e
Get rid of EventMap and EventKey types
lawrence-forooghian 705ea95
Improve typing of callListener function
lawrence-forooghian 28067d5
Convert *EventMap types to interfaces
lawrence-forooghian bd7f5d7
Split LockStatus’s allowed values into separate types
lawrence-forooghian 97f5ac2
Create overload signatures for event-related methods
lawrence-forooghian 4979610
Add `this` type parameter to EventListener
lawrence-forooghian 9da57ad
Create type for `EventListener`’s `this`
lawrence-forooghian cc7d295
Create overload signatures for Space.prototype.updateProfileData
lawrence-forooghian 440941f
Rename type param in Subset type
lawrence-forooghian 19ac73f
Extract return value of Space.prototype.getState to its own type
lawrence-forooghian 57be83d
Extract type of updateProfileData’s function param
lawrence-forooghian c27c748
Fix ably-js links in class-definitions.md
lawrence-forooghian f053f80
Remove types from class-definitions.md that don’t exist in codebase
lawrence-forooghian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
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.
I'd prefer that we do not use namespaces if possible. Namespaces, and enums, are two features of TS that break it's main advantage - of adding just types, not features (there is no namespaces or enums in JS). Could we use a module with named exports for this?
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.
Would you mind explaining your objection to my use of namespaces in this case, given that I'm using them as a way to organise types?
I am also happy to change it, but I don't think I understand what you mean by using a module, would you mind showing me an example?
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.
hey @lawrence-forooghian thought about this and I think it's ok to use them just for types.
My objection for using namespaces is that they do not exist in JavaScript and so if you add code into them they will have to compile into something else. They were deprecated at some point in TS but I think that decision was reversed (because of how many people use them maybe). Apart from them not existing in JavaScript, the main issue is they duplicate what modules do (ie. organise code, namespace methods and properties).