tingodb icon indicating copy to clipboard operation
tingodb copied to clipboard

Typescript definitions file

Open dyst5422 opened this issue 8 years ago • 2 comments

Should add a Typescript definitions file to DefinitelyTyped. Should be as simple as copying the official MongoDB definition and pruning it.

dyst5422 avatar Jul 20 '17 18:07 dyst5422

You can just use the @types/mongodb definition files. For example:

import tingodb from 'tingodb';
import { Db as MongoDb } from 'mongodb';

const Db = tingodb().Db;
const db = <MongoDb> new Db('./database.tingodb', {});

sualko avatar Jun 25 '19 11:06 sualko

Yeah, you could do that, but since tingo hasn't been fully updated yet to use the new apis it'd be kinda nice to have files which reflected what actually is there...

taxilian avatar Jun 30 '19 02:06 taxilian