Commit Graph

10 Commits

Author SHA1 Message Date
Alan Plum
3d022d90e8
Add Collection#name() 2018-11-28 17:00:57 +01:00
chrolivier
85b7547a3e function signature fixes 2018-11-01 12:37:27 +02:00
chrolivier
1b14cabe4a Added TypeScript definitions for queue operations 2018-11-01 11:02:11 +02:00
Chris Olivier
c199b3195a
Update index.d.ts
Corrected return type of jwtDecode from "string | null" to "object | null"
2018-10-25 09:25:47 +02:00
Andy
7c6c96516e
More fixes from dtslint improvements (#29765) 2018-10-15 17:35:36 -07:00
Alan Plum
7b31c27dbd
Update to latest API 2018-08-27 13:46:35 +02:00
Alan Plum
48a6bcba6f Add proper ArangoSearchView API (#27756) 2018-08-01 11:34:35 -07:00
Alan Plum
50c7c42a3a [ArangoDB] Update geo index type (#25607)
* Update geo index type

* Add test
2018-05-08 10:30:40 -07:00
Alan Plum
997a01e2b2 [ArangoDB] Fix collection properties argument & index fields type (#25383)
* Forgot about dotted index paths

* CollectionProperties are not an argument type

* Add keyOptions test

* Add proper mergeObjects option to updates

* Add aql.literal, query

* Better type middleware
2018-05-07 11:45:07 -07:00
Alan Plum
6c26901d8b Add ArangoDB typescript typings (#25087)
* Initial declaration WIP

* Unexplode linter

* Some linting

* More linting

* More linting

This was the last of the low-hanging fruit.

* Use generic string index types

There doesn't seem to be a way to set a "fallback" string index type
so I guess this has to be as generic as necessary.

* Expand stub interfaces

* Get rid of extra declares

These seem to be redundant

* Get rid of extra exports and const enum

This seems to simply work.

* @arangodb/index -> @arangodb

* Escape 'new' attribute to be safe?

* Replace string index types with compositesa

This seems to achieve the behaviour we want:
typeof db.asdfg == ArangoDB.Collection | undefined
typeof db._query == Function

* Both options actually exist

Thanks @Simran-B for clarifying this.

* Remove PlainObject interface

Turns out we actually want `object` as the default type almost
everywhere.

* Bolt down generics

No sense defaulting to object if we don't also enforce extending object.
Also those Documents and Edges might contain literally anything so let's allow that.

* This is probably a hack but at least it works

* Add example stub

* Deduplicate route handler signatures

* Brute force?

This feels wrong. There must be a better way.

* Pass linting

* Possible workaround for globals

* Unnecessary qualifier

* Override NodeJS types

* Add View API

* Slightly more specific graphql types

* Use actual graphql module for types

* Better model manifest/config/deps

* Apparently this doesn't require escaping

* Fix InsertResult

* Functions that always throw should return never?

* Add HttpStatus

* Add Console#logLines

* type to interface

* More example code

* Inline some types

* Inline JwtStorageOptions

* Add sessions middleware example

* Fix aql template string handler
2018-04-24 16:28:27 -07:00