UNPKG

@accordproject/concerto-cto

Version:
27 lines (26 loc) 1.14 kB
import { IModels } from '@accordproject/concerto-metamodel'; interface ParseOptions { skipLocationNodes?: boolean; } /** * Create a metamodel instance (i.e. JSON AST) object from a CTO string * @param {string} cto - the Concerto string * @param {string} [fileName] - an optional file name * @param {Object} [options] - an optional options parameter or filename * @param {boolean} [options.skipLocationNodes] - default true, when true location nodes will be skipped in the metamodel AST * @return {object} the metamodel instance for the cto argument */ declare function parse(cto: string, fileName?: string, options?: ParseOptions): any; /** * Parses an array of model files * @param {string[]} files - array of cto files * @param {Object} [options] - an optional options parameter * @param {string} [options.skipLocationNodes] - when true location nodes will be skipped in the metamodel AST * @return {IModels} the AST / metamodel */ declare function parseModels(files: string[], options?: ParseOptions): IModels; declare const _default: { parse: typeof parse; parseModels: typeof parseModels; }; export = _default;