From 412764e8c6aeba63a8f379fbb59c6b944bc6b3cc Mon Sep 17 00:00:00 2001 From: MarvNC Date: Thu, 1 Feb 2024 00:57:28 -0800 Subject: [PATCH] Add Phonetic Transcription Type --- src/types/yomitan/termbankmeta.ts | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/types/yomitan/termbankmeta.ts b/src/types/yomitan/termbankmeta.ts index 77cd11a..a403673 100644 --- a/src/types/yomitan/termbankmeta.ts +++ b/src/types/yomitan/termbankmeta.ts @@ -7,7 +7,7 @@ type TermFrequency = }; type FrequencyTerm = [ - {}, + string, 'freq', ( | TermFrequency @@ -26,7 +26,7 @@ type PitchAccentInfo = { }; type PitchTerm = [ - {}, + string, 'pitch', { reading: string; @@ -34,7 +34,19 @@ type PitchTerm = [ }, ]; -type TermMetaEntryType = PitchTerm | FrequencyTerm; +type TermPhoneticTranscription = [ + string, + 'ipa', + { + reading: string; + transcriptions: { + ipa: string; + tags?: string[]; + }[]; + }, +]; + +type TermMetaEntryType = PitchTerm | FrequencyTerm | TermPhoneticTranscription; type DictionaryTermMetaBankV3 = TermMetaEntryType[]; export type {