UNPKG

@barchart/common-js

Version:
52 lines (51 loc) 1.13 kB
/** * A complex object built from many {@link Field} instances. * * @public */ export default class Component { /** * The builds a {@link Component} for {@link Money}. * * @public * @static * @param {string} name * @returns {Component} */ public static forMoney(name: string): Component; /** * @param {string} name * @param {Array<Field>=} fields * @param {Function=} reviver */ constructor(name: string, fields?: Array<Field> | undefined, reviver?: Function | undefined); /** * Name of the component. * * @public * @returns {string} */ public get name(): string; /** * Type of the component. * * @public * @returns {Array<Field>} */ public get fields(): Array<Field>; /** * The reviver used to rebuild the entire component. * * @returns {Function} */ get reviver(): Function; /** * Returns a string representation. * * @public * @returns {string} */ public toString(): string; #private; } import Field from './Field.js';