Add a typescript declaration for Sync.SubscriptionState
This commit is contained in:
parent
384f43c637
commit
fadd35bb26
|
@ -406,7 +406,7 @@ declare namespace Realm.Sync {
|
|||
* @see { @link https://realm.io/docs/javascript/latest/api/Realm.Sync.Subscription.html }
|
||||
*/
|
||||
class Subscription {
|
||||
readonly state: number;
|
||||
readonly state: SubscriptionState;
|
||||
readonly error: string;
|
||||
|
||||
unsubscribe(): void;
|
||||
|
@ -414,6 +414,14 @@ declare namespace Realm.Sync {
|
|||
removeListener(subscruptionCallback: SubscriptionNotificationCallback): void;
|
||||
}
|
||||
|
||||
enum SubscriptionState {
|
||||
Error,
|
||||
Creating,
|
||||
Pending,
|
||||
Complete,
|
||||
Invalidated,
|
||||
}
|
||||
|
||||
/**
|
||||
* AuthError
|
||||
* @see { @link https://realm.io/docs/javascript/latest/api/Realm.Sync.AuthError.html }
|
||||
|
|
Loading…
Reference in New Issue