mirror of
https://github.com/status-im/realm-js.git
synced 2025-02-17 00:56:22 +00:00
Documenting sync.config properties (#1312)
* Documenting sync.config properties * Updating TypeScript definitions
This commit is contained in:
parent
e18f54594f
commit
b3ff7ada62
@ -291,7 +291,11 @@ Realm.defaultPath;
|
||||
* @property {Object} [sync] - Sync configuration parameters with the following
|
||||
* child properties:
|
||||
* - `user` - A `User` object obtained by calling `Realm.Sync.User.login`
|
||||
* - `url` - A `string` which contains a valid Realm Sync url
|
||||
* - `url` - A `string` which contains a valid Realm Sync url
|
||||
* - `error` - A callback function which is called in error situations
|
||||
* - `validate_ssl` - Indicating if SSL certificates must be validated
|
||||
* - `ssl_trust_certificate_path` - A path where to find trusted SSL certificates
|
||||
* The `error` callback can take up to four optional arguments: `message`, `isFatal`, `category`, and `code`.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
3
lib/index.d.ts
vendored
3
lib/index.d.ts
vendored
@ -341,11 +341,14 @@ declare namespace Realm.Sync {
|
||||
expiresAt?: Date;
|
||||
}
|
||||
|
||||
type ErrorCallback = (message?: string, isFatal?: boolean, category?: string, code?: number) => void;
|
||||
|
||||
interface SyncConfiguration {
|
||||
user: User;
|
||||
url: string;
|
||||
validate_ssl?: boolean;
|
||||
ssl_trust_certificate_path?: string;
|
||||
error?: ErrorCallback;
|
||||
}
|
||||
|
||||
type ProgressNotificationCallback = (transferred: number, transferable: number) => void;
|
||||
|
Loading…
x
Reference in New Issue
Block a user