HikidashiElementOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Host callbacks for a text-tool element. Native events carry the same result or message.
インポート
import type { HikidashiElementOptions } from "@johnmorrisdotca/hikidashi/element";
ほかのエクスポート元: @johnmorrisdotca/hikidashi/element/define
定義
type HikidashiElementOptions = {
onChange?: (result: HikidashiResult) => void;
onError?: (detail: {
message: string;
}) => void;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
onChange (省略可) | ((result: HikidashiResult) => void) | undefined | Called after input or presentation changes, with the result or null. |
onError (省略可) | ((detail: { message: string; }) => void) | undefined | Called with a plain message when the input cannot be read. |
例
import type { HikidashiElementOptions } from "@johnmorrisdotca/hikidashi/element";
const options: HikidashiElementOptions = { onChange: result => console.log(result) };
console.log(typeof options.onChange);function出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。