This commit is contained in:
freedakgmail
2025-11-23 14:46:53 +08:00
parent 2b4bc92f1b
commit d797f1abb9
98 changed files with 187824 additions and 161 deletions
+19
View File
@@ -0,0 +1,19 @@
declare module 'relationship.js' {
interface RelationshipOptions {
text: string // 关系文本,如"父亲的母亲"
target?: string // 相对对象
sex?: number // 性别:0女性,1男性,-1不限
type?: string // 转换类型
reverse?: boolean // 称呼方式
mode?: string // 模式选择
optimal?: boolean // 最短关系
}
/**
* 计算中文亲属关系
* @param options 关系选项
* @returns 关系称谓数组
*/
function relationship(options: RelationshipOptions): string[]
export default relationship
}