From fbd60547d4589b1e24275fc156befb97c3d2ff0a Mon Sep 17 00:00:00 2001 From: kkpoon Date: Tue, 13 Jun 2017 15:53:35 +0800 Subject: [PATCH] Fix rethinkdb connection SSL options --- types/rethinkdb/index.d.ts | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/types/rethinkdb/index.d.ts b/types/rethinkdb/index.d.ts index f375a50fc7..c2dbf4b49b 100644 --- a/types/rethinkdb/index.d.ts +++ b/types/rethinkdb/index.d.ts @@ -13,6 +13,8 @@ /// +import { ConnectionOptions as TLSConnectionOptions } from "tls"; + /** * https://rethinkdb.com/api/javascript/ */ @@ -80,7 +82,7 @@ declare module "rethinkdb" { } interface Row extends Expression { - (name: string): Expression; + (name: string): Expression; } /** @@ -112,14 +114,11 @@ declare module "rethinkdb" { * there is only one option available, and if the `ssl` option is specified, * this key is required. */ - ssl?: { - /** A list of Node.js `Buffer` objects containing SSL CA certificates */ - ca: Buffer[]; - }; + ssl?: TLSConnectionOptions; } interface NoReplyWait { - noreplyWait: boolean; + noreplyWait: boolean; } interface Connection { @@ -241,8 +240,8 @@ declare module "rethinkdb" { filter(rql: ExpressionFunction): Sequence; filter(rql: Expression): Sequence; - filter(obj: { [key: string]: any }): Sequence; - + filter(obj: { [key: string]: any }): Sequence; + /** * Turn a query into a changefeed, an infinite stream of objects representing * changes to the query’s results as they occur. A changefeed may return changes @@ -346,7 +345,7 @@ declare module "rethinkdb" { } interface BooleanMap { - [ key: string ]: Boolean | BooleanMap; + [key: string]: Boolean | BooleanMap; } interface Expression extends Writeable, Operation, HasFields> { @@ -490,21 +489,21 @@ declare module "rethinkdb" { interface Sort { } interface ReqlType { - $reql_type$: string; + $reql_type$: string; } interface Time extends ReqlType { - $reql_type$: "TIME"; - epoch_time: number; - timezone: string; + $reql_type$: "TIME"; + epoch_time: number; + timezone: string; } interface Binary extends ReqlType { - $reql_type$: "BINARY"; - data: string; + $reql_type$: "BINARY"; + data: string; } - interface ReqlError extends Error {} + interface ReqlError extends Error { } /** * An error has occurred within the driver. This may be a driver bug, or it may @@ -512,5 +511,5 @@ declare module "rethinkdb" { * * See https://www.rethinkdb.com/docs/error-types/ */ - interface ReqlDriverError extends ReqlError {} + interface ReqlDriverError extends ReqlError { } }