UNPKG

scriptable-testlab

Version:

A lightweight, efficient tool designed to manage and update scripts for Scriptable.

51 lines 863 B
import { AbsDictation } from "scriptable-abstract"; class MockDictation extends AbsDictation { static get instance() { return super.instance; } constructor() { super({ lastText: null, lastError: null }); } /** * @inheritdoc */ async start() { const text = "Sample dictated text"; this.setState({ lastText: text, lastError: null }); return text; } /** * @additional * Get the last dictated text */ getLastText() { return this.state.lastText; } /** * @additional * Get the last error if any */ getLastError() { return this.state.lastError; } /** * @additional * Clear dictation history */ clear() { this.setState({ lastText: null, lastError: null }); } } export { MockDictation }; //# sourceMappingURL=dictation.js.map