Commit Graph

7 Commits

Author SHA1 Message Date
Brian Crowell
3f5b9e5f0e [couchbase]: Ensure OpCallback is composable with normal callbacks (#27639)
The documentation gets weird about the API promising to return *some* kind
of value that evaluates to false, even if that might be the number zero.
The original types author expressed that as CouchbaseError | number, but
that makes it seem like the result could be some non-zero number.

I don't know whether the library actually issues callback(0) calls, but to
make it play better with normal callbacks (err?: Error), we will act as if
it uses null instead of zero.
2018-08-01 12:05:04 -07:00
Brian Crowell
75cb16b116 Couchbase: Lots of missing things from v2.4.5 SDK (#27457)
* couchbase: Fix Bucket key parameter types

Documentation says key type is string or Buffer, not any.

http://docs.couchbase.com/sdk-api/couchbase-node-client-2.4.5/Bucket.html

* couchbase: Add connect/error events to Bucket interface

* couchbase: Add optional properties for errors

"code" was not optional, but it is definitely not included on all errors.
I've added two more properties that I've seen in the couchbase source code.

* couchbase: Add enough features to get the front-page sample working

The first page of the couchbase documentation contains the code that is now
in couchbase-tests.ts (except that I've left out the underdocumented
cluster.authenticate() call). For this, I've added the index management
methods on the bucket manager interface as well as specific definitions
for the events on the query response interfaces.

* couchbase: Add authenticator API

It's marked "uncommitted," but it's in the main page sample, so...

* couchbase: Add the basic full-text search API

Needs some fixes to the Bucket query call, but that will be fixed here in a
bit.

* couchbase: Split query API, add SearchQuery + FtsQueryResponse.Meta props

Several important fixes.

* couchbase: Add FTS facet and sorting capabilities

* couchbase: Add more samples, make query callbacks optional

The samples force us to recognize that the query callbacks are optional.

* couchbase: Add version number and add me

Even though this doesn't cover everything in the latest SDK, that's the
version I based my changes on.
2018-07-25 14:27:30 -07:00
Andy Hanson
45c9246c09 Remove esModuleInterop from tsconfigs (no longer mandatory) 2018-02-14 14:55:13 -08:00
Andy
bef4d2b27d
Enable "esModuleInterop" in all tsconfigs (#23354) 2018-02-05 11:01:56 -08:00
Andy
19f89399e4 Ensure every package has a tslint.json (#21009)
* Ensure every package has a tslint.json

* Fixes
2017-10-25 11:13:50 -07:00
Andy
947a8fb761 Enable strictFunctionTypes (#20373) 2017-10-06 14:03:03 -07:00
Andy Hanson
354cec620d Move all packages to a types directory 2017-03-24 14:27:52 -07:00