Files
NapCatQQ/.pnpm-store/v3/files/c4/3bbf70a8a4b992a8f4970cdf41dda82ba6bdf675c5c980f966d72cd0c272c62dbec3bef8899ef4bfb4bb839b4df040eae6551700484b9886e510e12b27f9c2
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

28 lines
607 B
Plaintext

/**
* @import {Info, Space} from 'property-information'
*/
import {Schema} from './schema.js'
/**
* @param {ReadonlyArray<Schema>} definitions
* Definitions.
* @param {Space | undefined} [space]
* Space.
* @returns {Schema}
* Schema.
*/
export function merge(definitions, space) {
/** @type {Record<string, Info>} */
const property = {}
/** @type {Record<string, string>} */
const normal = {}
for (const definition of definitions) {
Object.assign(property, definition.property)
Object.assign(normal, definition.normal)
}
return new Schema(property, normal, space)
}