Added more comments

This commit is contained in:
Giuseppe Digilio
2019-03-17 19:21:02 +01:00
parent d90f69d15e
commit 299c7f7e2c
6 changed files with 604 additions and 24 deletions

View File

@@ -1,9 +1,28 @@
import { hasValue } from '../../shared/empty.util';
/**
* An interface to represent the path of a section error
*/
export interface SectionErrorPath {
/**
* The section id
*/
sectionId: string;
/**
* The form field id
*/
fieldId?: string;
/**
* The form field index
*/
fieldIndex?: number;
/**
* The complete path
*/
originalPath: string;
}
@@ -12,7 +31,7 @@ const regex = /([^\/]+)/g;
const regexShort = /\/sections\/(.*)/;
/**
* the following method accept an array of section path strings and return a path object
* The following method accept an array of section path strings and return a path object
* @param {string | string[]} path
* @returns {SectionErrorPath[]}
*/