UNPKG

@aire-ux/aire-condensation

Version:

Client-side serialization library for Aire-UX

18 lines (17 loc) 444 B
export default class RemoteRegistry { constructor() { this.mappings = new Map(); } register(type) { if (!this.mappings.has(type)) { this.mappings.set(type, { definitions: [] }); } return this.mappings.get(type); } defineParameter(type, definition) { this.register(type).definitions.push(definition); } resolve(key) { return this.mappings.get(key); } }