29 lines
601 B
JavaScript
29 lines
601 B
JavaScript
|
/**
|
||
|
* @typedef {import('./info.js').Info} Info
|
||
|
* @typedef {Record<string, Info>} Properties
|
||
|
* @typedef {Record<string, string>} Normal
|
||
|
*/
|
||
|
|
||
|
export class Schema {
|
||
|
/**
|
||
|
* @constructor
|
||
|
* @param {Properties} property
|
||
|
* @param {Normal} normal
|
||
|
* @param {string} [space]
|
||
|
*/
|
||
|
constructor(property, normal, space) {
|
||
|
this.property = property
|
||
|
this.normal = normal
|
||
|
if (space) {
|
||
|
this.space = space
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/** @type {Properties} */
|
||
|
Schema.prototype.property = {}
|
||
|
/** @type {Normal} */
|
||
|
Schema.prototype.normal = {}
|
||
|
/** @type {string|null} */
|
||
|
Schema.prototype.space = null
|