From fbc01f889d2cf65cf724b3e4d8e6d6635eaa6b20 Mon Sep 17 00:00:00 2001 From: loopArray <525029662@qq.com> Date: Sun, 27 Aug 2017 00:13:06 +0800 Subject: [PATCH] fixed some ts error My environment is typescript 2.4.2, which reminds me of the wrong type. `[ts] JSX element type 'Icon' does not have any construct or call signatures.` When you add `typeof` changes like this, there is no error --- types/react-native-vector-icons/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/react-native-vector-icons/index.d.ts b/types/react-native-vector-icons/index.d.ts index 3e9af9e042..b9dfc622c3 100644 --- a/types/react-native-vector-icons/index.d.ts +++ b/types/react-native-vector-icons/index.d.ts @@ -24,7 +24,7 @@ export function createIconSet( glyphMap: {}, fontFamily: string, fontFile?: string -): Icon; +): typeof Icon; /** * Convenience method to create a custom font based on a fontello config file. @@ -41,7 +41,7 @@ export function createIconSet( * @param {{}} config * @returns {Icon} */ -export function createIconSetFromFontello(config: {}): Icon; +export function createIconSetFromFontello(config: {}): typeof Icon; /** * Convenience method to create a custom font from IcoMoon @@ -59,4 +59,4 @@ export function createIconSetFromFontello(config: {}): Icon; * @param {{}} config * @returns {Icon} */ -export function createIconSetFromIcoMoon(config: {}): Icon; +export function createIconSetFromIcoMoon(config: {}): typeof Icon;