aboutsummaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-07-06 18:23:02 +0200
committerlonkaars <loek@pipeframe.xyz>2023-07-06 18:23:02 +0200
commitcd01df3747ff361fab819fd1d30fac1dba6240e1 (patch)
tree2333eee43667c5cae6d8cebf6cc67bb5fb5a718e /api
parentcb78013884e3aa3b1e1a91722f5eeb78c62f6796 (diff)
update tests and examples
Diffstat (limited to 'api')
-rw-r--r--api/yomikun.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/api/yomikun.ts b/api/yomikun.ts
index 60d49ba..a7f214e 100644
--- a/api/yomikun.ts
+++ b/api/yomikun.ts
@@ -5,9 +5,15 @@ import Sentence from "./sentence.ts";
export default class Yomikun {
protected core: Core;
+ public ready: Promise<void>;
constructor(core?: Core) {
this.core = core ?? new RemoteCoreClient();
+
+ this.ready = new Promise(async resolve => {
+ await this.core.ready;
+ resolve();
+ })
}
async sentence(input: string): Promise<Sentence> {