types: fix translate typing

This commit is contained in:
chenjiahan
2020-12-13 12:29:30 +08:00
parent 09858eb1d3
commit d38e4a6aa8
3 changed files with 8 additions and 12 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ import locale from '../../locale';
export function createTranslate(name: string) {
const prefix = camelize(name) + '.';
return function (path: string, ...args: any[]): string {
return function (path: string, ...args: any[]): any {
const messages = locale.messages();
const message = get(messages, prefix + path) || get(messages, path);