From cd01df3747ff361fab819fd1d30fac1dba6240e1 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Thu, 6 Jul 2023 18:23:02 +0200 Subject: update tests and examples --- api/yomikun.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'api') 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; constructor(core?: Core) { this.core = core ?? new RemoteCoreClient(); + + this.ready = new Promise(async resolve => { + await this.core.ready; + resolve(); + }) } async sentence(input: string): Promise { -- cgit v1.2.3