From a7f750fa52423795f3e2db8d39c7d8ce8e4f6ffc Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Thu, 23 May 2019 11:32:31 +0800 Subject: [PATCH] feat: intl key intellisense --- src/typings.d.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/typings.d.ts b/src/typings.d.ts index ae32dca5..e59eb7a3 100644 --- a/src/typings.d.ts +++ b/src/typings.d.ts @@ -1,3 +1,5 @@ +import zh_CN from './locales/zh-CN'; + declare module '*.css'; declare module '*.less'; declare module '*.scss'; @@ -24,3 +26,11 @@ declare module 'memoize-one' { ): T; export default memoizeOne; } + +declare module 'umi-plugin-react/locale' { + export default interface MessageDescriptor { + id: keyof (typeof zh_CN); // default using zh_CN + description?: string; + defaultMessage?: string; + } +} -- GitLab