-
Notifications
You must be signed in to change notification settings - Fork 8
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
Documentation tweaks post-API updates #142
Conversation
@@ -107,7 +107,7 @@ space.subscribe('update', (spaceState) => { | |||
}); | |||
|
|||
// Enter a space, publishing an update event, including optional profile data | |||
space.enter({ | |||
await space.enter({ |
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've added these everywhere in docs to make it clear these are async operations and can be waited upon
@@ -136,7 +136,7 @@ The following is an example event payload received by subscribers when a user en | |||
|
|||
## Space members | |||
|
|||
The `members` namespace within a Space is a client-side filtered listener optimized for building avatar stacks. Subscribe to members entering, leaving, being removed from the Space (after a timeout) or updating their profile information. | |||
The `members` namespace contains methods dedicated to building avatar stacks. Subscribe to members entering, leaving, being removed from the Space (after a timeout) or updating their profile information. |
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 wasn't a big fan of the wording here - I think it's not accurate and could lead to confusion (a listener is for an example a function passed to an event listener; that's not what the namespace is, just the subscribe
method. I think also saying client-side filtered
is quite unspecific, we should be more specific or leave out the implementation detail here, like I did above)
|
||
```ts | ||
type getSelf = () => Promise<SpaceMember | undefined>; | ||
type getSelf = () => Promise<SpaceMember | null>; |
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 made a separate PR to make sure we always return null
from these get*
methods #141
@@ -355,7 +355,7 @@ space.locations.unsubscribe('update'); | |||
Get location for self. | |||
|
|||
```ts | |||
type getSelf = () => Promise<Location | undefined>; | |||
type getSelf = () => Promise<Location>; |
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.
Location
, as defined in this file, already includes null
in it's type definition
Tweaks to our repo documentation post API updates.