Skip to content

Commit 981449f

Browse files
authored
Merge pull request #17 from MarvNC:add-types
Add Phonetic Transcription Type
2 parents b1b46a2 + 412764e commit 981449f

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/types/yomitan/termbankmeta.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type TermFrequency =
77
};
88

99
type FrequencyTerm = [
10-
{},
10+
string,
1111
'freq',
1212
(
1313
| TermFrequency
@@ -26,15 +26,27 @@ type PitchAccentInfo = {
2626
};
2727

2828
type PitchTerm = [
29-
{},
29+
string,
3030
'pitch',
3131
{
3232
reading: string;
3333
pitches: PitchAccentInfo[];
3434
},
3535
];
3636

37-
type TermMetaEntryType = PitchTerm | FrequencyTerm;
37+
type TermPhoneticTranscription = [
38+
string,
39+
'ipa',
40+
{
41+
reading: string;
42+
transcriptions: {
43+
ipa: string;
44+
tags?: string[];
45+
}[];
46+
},
47+
];
48+
49+
type TermMetaEntryType = PitchTerm | FrequencyTerm | TermPhoneticTranscription;
3850
type DictionaryTermMetaBankV3 = TermMetaEntryType[];
3951

4052
export type {

0 commit comments

Comments
 (0)