UNPKG

purespectrum-lib

Version:

shared code between front and backend projects

31 lines (30 loc) 1.1 kB
/** * Core mapper class for new child age gender qualification. * A instance of this class represent one child, its age, gender and * the new condition code that represents it. * This class use new child age gender condition code to determine child age and gender. */ export declare class Child { code: number; /** * Create a new Child from a new child gender age condition code. */ constructor(code: number); /** * Create a new Child from criterias * @param {boolean} isBaby - true for baby ages, meaning months from 1 to 11. * false for child ages, meaning years from 1 to 17. * @param {boolean} isBoy - child gender: true for boy or false for girl. * @param {number} age - child age. * @returns a new Child instance */ static create(isBaby: boolean, isBoy: boolean, age: number): Child; static createNoChildren(): Child; get noChildren(): boolean; get isBaby(): boolean; get isBoy(): boolean; get age(): number; get ageUnit(): "Months" | "Year"; get gender(): string; get ageWithUnit(): string; }