export default class Namespace {
    readonly name: string;
    
    properties: Map<string, any>;

    constructor(name: string, properties: Map<string, any>=new Map()) {
        this.name = name;
        this.properties = properties;
    }

    get(name: string) {
        if(this.properties.has(name)) {
            return this.properties.get(name)!;
        }

        throw new String(`Undefined property '${name}'.`);
    }

    set(name: string, value: any) {
        this.properties.set(name, value);
    }

}