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 error on super.intialize #80

Open
Baptiste-Garcin opened this issue Sep 14, 2021 · 1 comment
Open

Typescript error on super.intialize #80

Baptiste-Garcin opened this issue Sep 14, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@Baptiste-Garcin
Copy link

I have a typescript error when I try to implement an initialize method in my dataSource

image

So either the doc is wrong or the type for this method is missing in the index.d.ts.

I am a typescript newbie so I don't really know the good way to fix it. Should the initialize method be define in you index.d.ts ?
Does this error is normal and I should ensure the method exist before calling it ?

I can do a PR if we agree on the good way to do this

@lorensr
Copy link
Member

lorensr commented Sep 14, 2021

Thanks for reporting! MongoDataSource's initialize function is always defined, so you shouldn't need to check. Adding to index.d.ts would be great, thanks ☺️

@lorensr lorensr added the enhancement New feature or request label Oct 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants