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

[ENHANCEMENT] Move init function to private #6

Open
frank-zsy opened this issue Sep 4, 2019 · 0 comments
Open

[ENHANCEMENT] Move init function to private #6

frank-zsy opened this issue Sep 4, 2019 · 0 comments
Labels
good first issue Good for newcomers

Comments

@frank-zsy
Copy link
Collaborator

Now, users need to call init by their own and could not make any query before init. Not put init into constructor just because TypeScript not support async constructor.

But actually we can call init in constructor and check inited flag in query so that query will be the only public API that can be used, and since query is async function already, it can use waitFor function to check the inited flag.

@frank-zsy frank-zsy added the good first issue Good for newcomers label Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant