diff --git a/types/react-tagsinput/index.d.ts b/types/react-tagsinput/index.d.ts index d234a19c12..8b0b8e7ebb 100644 --- a/types/react-tagsinput/index.d.ts +++ b/types/react-tagsinput/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for react-tagsinput 3.19 // Project: https://github.com/olahol/react-tagsinput // Definitions by: Michael Macnair +// Richard Tan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -42,6 +43,8 @@ declare namespace TagsInput { readonly tag: Tag; } + type RenderLayout = (tagComponent: React.Component[], inputComponent: React.Component) => React.ReactChild; + interface ReactTagsInputProps extends React.Props { value: Tag[]; onChange: (tags: Tag[], changed: Tag[], changedIndexes: number[]) => void; @@ -65,7 +68,7 @@ declare namespace TagsInput { tagDisplayProp?: string | null; renderTag?: (props: RenderTagProps) => React.ReactNode; renderInput?: (props: RenderInputProps) => React.ReactNode; - renderLayout?: (tagComponents: React.Component[], inputComponent: React.Component) => React.ReactChild; + renderLayout?: RenderLayout; preventSubmit?: boolean; } }