Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript support? #22

Open
Augustin82 opened this issue Jul 28, 2020 · 2 comments · May be fixed by #26
Open

Typescript support? #22

Augustin82 opened this issue Jul 28, 2020 · 2 comments · May be fixed by #26

Comments

@Augustin82
Copy link

Hello, I couldn't find any Typescript support for this library, does it exist?

Many thanks!

@LoiKos
Copy link

LoiKos commented Oct 6, 2020

any news on this ?

@JR-Utily
Copy link

I'm interested also. I'm obliged to cast db as any to modify the createId method:

    // add basic getById methods
    db._.mixin(lodashId);
    // add collection() methods to remove magic strings
    db._.mixin({
      collection: function(obj) { return obj['col']; }
    });
    // override defaults from lodashId
    (db._ as any).id = '_id';
    (db._ as any).createId = (collection: any, doc: any) => {
      return `${name}@${nanoid(10)}`;
    };

@likun7981 likun7981 linked a pull request Jun 24, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants