fix(package/locale): types

This commit is contained in:
Linden
2024-01-14 10:05:53 +11:00
parent e94035551c
commit 6da661bef3

View File

@@ -1,9 +1,9 @@
import { cache } from '../cache/index';
import { printf } from 'fast-printf';
const dict: { [key: string]: string | number } = {};
const dict: Record<string, string> = {};
export const locale = (str: keyof typeof dict, ...args: any[]) => {
export const locale = (str: string, ...args: any[]) => {
const lstr = dict[str];
if (!lstr) return str;