aboutsummaryrefslogtreecommitdiff
path: root/core/raw
diff options
context:
space:
mode:
Diffstat (limited to 'core/raw')
-rw-r--r--core/raw/api.ts14
1 files changed, 8 insertions, 6 deletions
diff --git a/core/raw/api.ts b/core/raw/api.ts
index f47dead..593b932 100644
--- a/core/raw/api.ts
+++ b/core/raw/api.ts
@@ -1,27 +1,29 @@
import Core from "../api.ts";
import Parser from "../../language/parser.ts";
import YomikunError from "../../util/error.ts";
+import { DeepPartial } from "../../util/types.ts";
+import { InputSentenceProps } from "../../language/types.ts";
/** @summary internal Core (DO NOT USE DIRECTLY) */
export default class RawCore implements Core {
- private _parser: Parser;
- ready: Promise<void>;
+ private parser: Parser;
+ public ready: Promise<void>;
constructor() {
if (this.constructor === RawCore) {
throw new YomikunError("RawCore instantiated! Use DirectCoreClient instead!");
}
- this._parser = new Parser();
+ this.parser = new Parser();
this.ready = new Promise(async resolve => {
- await this._parser.ready;
+ await this.parser.ready;
resolve();
})
}
- async parseSentence(input: string) {
- return await this._parser.parse(input);
+ async parseSentence(input: string, options?: DeepPartial<InputSentenceProps>) {
+ return await this.parser.parse(input, options);
}
};