Skip to content

Commit

Permalink
Improve batchConv type checking (#33)
Browse files Browse the repository at this point in the history
* Improve batchConv type checking

* Update typings.d.ts
  • Loading branch information
sunafterrainwm authored Feb 11, 2025
1 parent c08fc29 commit 601f312
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ declare module 'ext.gadget.HanAssist' {
* @param locale locale, defaults to `wgUserLanguage`
* @returns converted candidates dictionary
*/
export function batchConv(
candidatesDict: Record<string, string | Candidates>, locale?: string,
): Record<string, string>;
export function batchConv<T extends string>(
candidatesDict: Record<T, string | Candidates>, locale?: string,
): Record<T, string>;

global {
/** @deprecated Use `HanAssist.conv` instead */
Expand Down

0 comments on commit 601f312

Please sign in to comment.