import {Schema} from './schema.js' /** * @typedef {import('./schema.js').Properties} Properties * @typedef {import('./schema.js').Normal} Normal */ /** * @param {import('./schema.js').Schema[]} definitions * @param {string} space * @returns {import('./schema.js').Schema} */ export function merge(definitions, space) { /** @type {Properties} */ var property = {} /** @type {Normal} */ var normal = {} var index = -1 while (++index < definitions.length) { Object.assign(property, definitions[index].property) Object.assign(normal, definitions[index].normal) } return new Schema(property, normal, space) }