-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: custom effect for multiple and polyphonic
- Loading branch information
Showing
7 changed files
with
191 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,28 @@ | ||
type CustomHandleType = 'add' | 'replace'; | ||
type CustomDictType = 'pinyin' | 'multiple' | 'polyphonic'; | ||
interface CustomPinyinOptions { | ||
/** | ||
* @description: multiple 对于 customPinyin 补充词汇的处理 | ||
*/ | ||
multiple?: CustomHandleType; | ||
/** | ||
* @description: polyphonic 对于 customPinyin 补充词汇的处理 | ||
*/ | ||
polyphonic?: CustomHandleType; | ||
} | ||
/** | ||
* @description: 用户自定义拼音 | ||
* @param {{ [key: string]: string }} config 用户自定义的拼音映射(支持汉字、词语、句子的映射),若匹配到该映射,优先将汉字转换为该映射 | ||
* @param {CustomPinyinOptions} options multiple/polyphonic 对于 customPinyin 补充词汇的处理 | ||
*/ | ||
export declare function customPinyin(config?: { | ||
[key: string]: string; | ||
}): void; | ||
}, options?: CustomPinyinOptions): void; | ||
export declare const getCustomDict: () => { | ||
[key: string]: string; | ||
}; | ||
export declare const getCustomMultpileDict: () => string[]; | ||
export declare const getCustomPolyphonicDict: () => string[]; | ||
export declare function clearCustomDict(dict: CustomDictType | CustomDictType[]): void; | ||
export declare function hasCustomConfig(): boolean; | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters