From 90cacdd6c7ccc28e1ecc726dc6dcacbd06542eec Mon Sep 17 00:00:00 2001 From: Kenneth Geisshirt Date: Wed, 14 Mar 2018 15:09:45 +0100 Subject: [PATCH 1/3] Fixing TS definition for open_ssl_verify_callback. --- CHANGELOG.md | 2 +- lib/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4d9152b..1c4a93ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ X.Y.Z Release notes * Added an optional user as argument to `Realm.automaticSyncConfiguration` (#1708). ### Bug fixes -* None. +* Fixed from TypeScript defintion for `open_ssl_verify_callback` configuration option (#1652). ### Internal * None. diff --git a/lib/index.d.ts b/lib/index.d.ts index 22008460..d289f08b 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -369,7 +369,7 @@ declare namespace Realm.Sync { } type ErrorCallback = (session: Session, error: SyncError) => void; - type SSLVerifyCallback = (serverAddress: string, serverPort: number, pemCertificate: string, preverifyOk: number, depth: number) => boolean; + type SSLVerifyCallback = (serverAddress: string, serverPort: number, pemCertificate: string, acceptedByOpenSSL: boolean, depth: number) => boolean; interface SyncConfiguration { user: User; From 5cfc3c12eece7d4c4eab2a8a4ffbf7145b3cf54f Mon Sep 17 00:00:00 2001 From: Kenneth Geisshirt Date: Wed, 18 Apr 2018 14:07:19 +0200 Subject: [PATCH 2/3] Use a single object instead of multiple arguments. --- lib/index.d.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/index.d.ts b/lib/index.d.ts index f0d5b0f9..95ffc299 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -368,8 +368,16 @@ declare namespace Realm.Sync { code: number; } + interface SSLVerifyObject { + serverAddress: string; + serverPort: number; + pemCertificate: string; + acceptedByOpenSSL: boolean; + depth: number; + } + type ErrorCallback = (session: Session, error: SyncError) => void; - type SSLVerifyCallback = (serverAddress: string, serverPort: number, pemCertificate: string, acceptedByOpenSSL: boolean, depth: number) => boolean; + type SSLVerifyCallback = (sslVerifyObject: SSLVerifyObject) => boolean; interface SyncConfiguration { user: User; From 01a6a53a626f226f5df30755af2f059c5b168860 Mon Sep 17 00:00:00 2001 From: Kenneth Geisshirt Date: Mon, 7 May 2018 11:26:29 +0200 Subject: [PATCH 3/3] Typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8a41c00..b83f1477 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ X.Y.Z Release notes * None. ### Bug fixes -* Fixed from TypeScript defintion for `open_ssl_verify_callback` configuration option (#1652). +* Fixed TypeScript defintion for `open_ssl_verify_callback` configuration option (#1652). ### Internal * Updated to Relm Sync 3.3.0.