types / rethinkdb

Types for https://github.com/rethinkdb/rethinkdb
MIT License
11 stars 6 forks source link

Property 'contains' does not exist on type 'RArray<string>' #9

Closed lukeify closed 7 years ago

lukeify commented 7 years ago

Typescript Error TS2339. Produced with this code:

    let result  = await r.dbList().contains(config.dbName).do(databaseExists => {
                    return r.branch(databaseExists, { dbs_created: 0 }, r.dbCreate(config.dbName));
                }).run(conn);

It's complaining .contains() is not available off of .dbList().

Should this be valid considering the code itself works and has been mentioned here?

blakeembrey commented 7 years ago

Feel free to submit a PR, it just need to be added to https://github.com/types/npm-rethinkdb/blob/3cc3da29b0b54eb522d0843034ca5a9ade796ea8/rethinkdb.d.ts#L31.

lukeify commented 7 years ago

Closing as per #10