neumino / rethinkdbdash

An advanced Node.js driver for RethinkDB with a connection pool, support for streams etc.
MIT License
848 stars 109 forks source link

Cant import module using es6 #369

Closed nigel-dewar closed 6 years ago

nigel-dewar commented 6 years ago

Hi There,

I found the module wont import when using es6. For instance, this does not work

import * as r from 'rethinkdbdash';

or import rethinkdbdash from 'rethinkdbdash';

throws an error. Im using typescript, targeting es 6.

image

have also tried this

image

but it throws this error

image

this of course still works fine const r = require('rethinkdbdash')({db: 'CRMv3', silent: true});

Any help would be greatly appreciated, as I do really love your driver. Its really nice to work with.

cheers

Nige

sagivf commented 6 years ago

Hey @nigel-dewar, I just tired this on a project and it worked fine. There are no TS definitions for rethinkdbdash so it's probably some sort of TS config, or maybe adding an "any" somewhere. If you can recreate the issues on some github project I don't mind trying it out to help.

nigel-dewar commented 6 years ago

You are right sorry. Adding an any solved it. My bad.