UNPKG

kanji-inspector

Version:

A TypeScript library that provides Unihan data as type-safe constants for Kanji and CJK ideographs.

79 lines (78 loc) 4.5 kB
import { Codepoint } from '../common/Codepoint.js'; import { DictionaryIndexType, DictionaryLikeDatumType, IRGSourceType, NumericValueType, OtherMappingType, RadicalStrokeCountType, ReadingType, VariantType } from '../data/UnihanType'; export type { DictionaryIndexType, DictionaryLikeDatumType, IRGSourceType, NumericValueType, OtherMappingType, RadicalStrokeCountType, ReadingType, VariantType }; export declare const getDictionaryIndex: (codepoint: string | number) => Promise<DictionaryIndexType | null>; export declare const getDictionaryLikeData: (codepoint: string | number) => Promise<DictionaryLikeDatumType | null>; export declare const getIRGSource: (codepoint: string | number) => Promise<IRGSourceType | null>; export declare const getNumericValue: (codepoint: string | number) => Promise<NumericValueType | null>; export declare const getOtherMapping: (codepoint: string | number) => Promise<OtherMappingType | null>; export declare const getRadicalStrokeCount: (codepoint: string | number) => Promise<RadicalStrokeCountType | null>; export declare const getReading: (codepoint: string | number) => Promise<ReadingType | null>; export declare const getVariant: (codepoint: string | number) => Promise<VariantType | null>; export declare const getDictionaryIndices: (codepoints: (string | number)[]) => Promise<DictionaryIndexType[]>; export declare const getDictionaryLikeDataList: (codepoints: (string | number)[]) => Promise<DictionaryLikeDatumType[]>; export declare const getIRGSources: (codepoints: (string | number)[]) => Promise<IRGSourceType[]>; export declare const getNumericValues: (codepoints: (string | number)[]) => Promise<NumericValueType[]>; export declare const getOtherMappings: (codepoints: (string | number)[]) => Promise<OtherMappingType[]>; export declare const getRadicalStrokeCounts: (codepoints: (string | number)[]) => Promise<RadicalStrokeCountType[]>; export declare const getReadings: (codepoints: (string | number)[]) => Promise<ReadingType[]>; export declare const getVariants: (codepoints: (string | number)[]) => Promise<VariantType[]>; export declare const getAvailableTables: () => string[]; export declare const closeDatabase: () => void; export declare const closeTableConnection: (tableName: string) => void; export declare const getKanjiDetail: (codepoint: string | number) => Promise<{ char: string; codepoint: number; codepointStr: string; dictionaryIndex: DictionaryIndexType | null; dictionaryLikeData: DictionaryLikeDatumType | null; iRGSource: IRGSourceType | null; numericValue: NumericValueType | null; otherMapping: OtherMappingType | null; radicalStrokeCount: RadicalStrokeCountType | null; reading: ReadingType | null; variant: VariantType | null; }>; export declare const getKanjiDetailList: (codepoints: (string | number)[]) => Promise<{ char: string; codepoint: number; codepointStr: string; dictionaryIndex: DictionaryIndexType | undefined; dictionaryLikeData: DictionaryLikeDatumType | undefined; iRGSource: IRGSourceType | undefined; numericValue: NumericValueType | undefined; otherMapping: OtherMappingType | undefined; radicalStrokeCount: RadicalStrokeCountType | undefined; reading: ReadingType | undefined; variant: VariantType | undefined; }[]>; export { Codepoint }; declare const _default: { getKanjiDetail: (codepoint: string | number) => Promise<{ char: string; codepoint: number; codepointStr: string; dictionaryIndex: DictionaryIndexType | null; dictionaryLikeData: DictionaryLikeDatumType | null; iRGSource: IRGSourceType | null; numericValue: NumericValueType | null; otherMapping: OtherMappingType | null; radicalStrokeCount: RadicalStrokeCountType | null; reading: ReadingType | null; variant: VariantType | null; }>; getKanjiDetailList: (codepoints: (string | number)[]) => Promise<{ char: string; codepoint: number; codepointStr: string; dictionaryIndex: DictionaryIndexType | undefined; dictionaryLikeData: DictionaryLikeDatumType | undefined; iRGSource: IRGSourceType | undefined; numericValue: NumericValueType | undefined; otherMapping: OtherMappingType | undefined; radicalStrokeCount: RadicalStrokeCountType | undefined; reading: ReadingType | undefined; variant: VariantType | undefined; }[]>; }; export default _default;