diff options
author | lonkaars <loek@pipeframe.xyz> | 2023-06-28 23:59:50 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2023-06-28 23:59:50 +0200 |
commit | 67dbb6421976254658c5e38045513129dd18187a (patch) | |
tree | 288b599d1097b26bdbcad3b6749b38e133017cf2 /core/api.ts |
initial public commit
Diffstat (limited to 'core/api.ts')
-rw-r--r-- | core/api.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/api.ts b/core/api.ts new file mode 100644 index 0000000..0891081 --- /dev/null +++ b/core/api.ts @@ -0,0 +1,16 @@ +import { ParseResult } from "../language/types.ts"; + +/** + * @summary API interface + * + * This interface gets implemented by all API clients, so clients can be + * swapped easily. + */ +export default abstract class API { + /** @summary prepare API client */ + abstract prepare(): Promise<void>; + + /** @summary parse sentence */ + abstract parseSentence(input: string): Promise<ParseResult>; +}; + |