/**
 * A contribution management utility class
 * Define a type and register items using this class
 */
export class ContributionManager {
    constructor() {
        this.contributions = new Map();
    }
    register(id, item) {
        this.contributions.set(id, item);
        return {
            dispose: () => {
                this.contributions.delete(id);
            },
        };
    }
    get(id) {
        return this.contributions.get(id);
    }
    dispose() {
        this.contributions.clear();
    }
}
//# sourceMappingURL=contribution.js.map