loadBushuData関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Loads the data a picker shows, each module at the moment it is asked for, so that a page which never opens a picker never loads it:
the radicals, the Japanese names and the strokes of a kanji. Hand the result to mountBushu:
const data = await loadBushuData();
mountBushu(element, { ...data, language: "ja" });インポート
import { loadBushuData } from "@johnmorrisdotca/bushu/picker";
定義
function loadBushuData(): Promise<Pick<BushuMountOptions, "radicals" | "names" | "strokes">>
戻り値
Promise<Pick<BushuMountOptions, "names" | "strokes" | "radicals">>
The loaded native radical entries and name/stroke callbacks for mountBushu.
例
import { RADKFILE } from "@johnmorrisdotca/bushu/radkfile";
import { loadBushuData } from "@johnmorrisdotca/bushu/picker";
const radicals = RADKFILE.radicals;
console.log((await loadBushuData()).radicals.length);253出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。