Skip to content

Commit 601f312

Browse files
Improve batchConv type checking (#33)
* Improve batchConv type checking * Update typings.d.ts
1 parent c08fc29 commit 601f312

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

typings.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ declare module 'ext.gadget.HanAssist' {
2020
* @param locale locale, defaults to `wgUserLanguage`
2121
* @returns converted candidates dictionary
2222
*/
23-
export function batchConv(
24-
candidatesDict: Record<string, string | Candidates>, locale?: string,
25-
): Record<string, string>;
23+
export function batchConv<T extends string>(
24+
candidatesDict: Record<T, string | Candidates>, locale?: string,
25+
): Record<T, string>;
2626

2727
global {
2828
/** @deprecated Use `HanAssist.conv` instead */

0 commit comments

Comments
 (0)