Skip to content

[ENHANCEMENT] Move init function to private #6

@frank-zsy

Description

@frank-zsy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions