payload
Version:
Node, React, Headless CMS and Application Framework built on Next.js
28 lines • 1 kB
TypeScript
import type { ClientField, Field, Tab, TabAsFieldClient } from './config/types.js';
type Args = {
field: ClientField | Field | Tab | TabAsFieldClient;
index: number;
parentIndexPath: string;
parentPath: string;
parentSchemaPath: string;
};
type FieldPaths = {
/**
* A string of '-' separated indexes representing where
* to find this field in a given field schema array.
* It will always be complete and accurate.
*/
indexPath: string;
/**
* Path for this field relative to its position in the data.
*/
path: string;
/**
* Path for this field relative to its position in the schema.
*/
schemaPath: string;
};
export declare function getFieldPaths({ field, index, parentIndexPath, parentPath, parentSchemaPath, }: Args): FieldPaths;
export declare function getFieldPathsModified({ field, index, parentIndexPath, parentPath, parentSchemaPath, }: Args): FieldPaths;
export {};
//# sourceMappingURL=getFieldPaths.d.ts.map