@lynxts/core • Docs
@lynxts/core / arrayFieldOf
arrayFieldOf<
T
>():ArrayFieldOf
<T
>
Utility function which helps you create an ArrayField component of an specific struct type. Once you have this, the only type parameter left is the Path<T> of the property which is an array.
• T extends Struct
ArrayFieldOf
<T
>
an ArrayField of the specified struct type
interface User {
name: string;
roles: Role[];
}
const ArrayField = arrayFieldOf<User>();
<ArrayField name="roles">
...
</ArrayField>