feat: implement locale switching between Simplified and Traditional Chinese with opencc-js

This commit is contained in:
kuekhaoyang
2026-03-01 13:22:06 +08:00
parent c95d7d5d95
commit 1e14948225
16 changed files with 234 additions and 74 deletions
+14
View File
@@ -0,0 +1,14 @@
declare module 'opencc-js' {
interface ConverterOptions {
from: 'cn' | 'tw' | 'twp' | 'hk' | 'jp';
to: 'cn' | 'tw' | 'twp' | 'hk' | 'jp';
}
export function Converter(options: ConverterOptions): (text: string) => string;
export function HTMLConverter(
converter: (text: string) => string,
rootNode: HTMLElement,
fromLangTag: string,
toLangTag: string
): void;
}