File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ type LangPack = {
1111 clickTips : string
1212 summary : string
1313}
14+ export type Locale = 'cn' | 'zh_CN' | 'zh_TW' | 'en' | 'ru' | 'ja' | 'pt' | 'it' | 'es'
1415const cn = {
1516 addChild : '插入子节点' ,
1617 addParent : '插入父节点' ,
@@ -24,7 +25,7 @@ const cn = {
2425 clickTips : '请点击目标节点' ,
2526 summary : '摘要' ,
2627}
27- const i18n : Record < string , LangPack > = {
28+ const i18n : Record < Locale , LangPack > = {
2829 cn,
2930 zh_CN : cn ,
3031 zh_TW : {
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import type { Arrow } from '../arrow'
77import type { Summary , SummarySvgGroup } from '../summary'
88import type SelectionArea from '@viselect/vanilla'
99import type { MainLineParams , SubLineParams } from '../utils/generateBranch'
10+ import type { Locale } from '../i18n'
1011export * from '../methods'
1112
1213type Before = Partial < {
@@ -113,7 +114,7 @@ type PathString = string
113114export type Options = {
114115 el : string | HTMLElement
115116 direction ?: number
116- locale ?: string
117+ locale ?: Locale
117118 draggable ?: boolean
118119 editable ?: boolean
119120 contextMenu ?: boolean
You can’t perform that action at this time.
0 commit comments