In Flow Types :
export type GroupType = {
options: OptionsType,
[string]: any,
};
What does [string]: any
mean ?
Edit :
Thank you for your responses.
How do I must understand this piece of code ?
import type { GroupType } from './types';
const formatGroupLabel = (group: GroupType): string => group.label;
For me formatGroupLabel
is a function that takes group
as a parameter and return group.label
. But I don't understand why there is : string
in front of (group: GroupType)
. May be there is no link with my first question.