diff --git a/types/react-fa/index.d.ts b/types/react-fa/index.d.ts index 54a2581cd0..ae4baa322e 100644 --- a/types/react-fa/index.d.ts +++ b/types/react-fa/index.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import { Component, ComponentClass, HTMLProps, StatelessComponent } from "react"; +import { Component, ComponentClass, HTMLProps, StatelessComponent, ReactElement } from "react"; // fake intermediate interface to remove typing on size, as the typing // is overrided by react-fa @@ -37,15 +37,7 @@ export const Icon: ComponentClass; export interface IconStackProps extends SizeOverrideHTMLProps { size?: IconSize; - - // Does not work with TypeScript 2.3: - // Type '{ size: "lg"; children: Element[]; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes> & Reado...'. - // Type '{ size: "lg"; children: Element[]; }' is not assignable to type 'Readonly'. - // Types of property 'children' are incompatible. - // Type 'Element[]' is not assignable to type 'IconProps[]'. - // Type 'Element' is not assignable to type 'IconProps'. - // Property 'name' is missing in type 'Element'. - // children?: IconProps[]; + children?: ReactElement | Array>; } export type IconStack = Component;