Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public add(key: string, v: T): void {
if (this.containsKey(key)) throw new Error(`duplicate key ${key}`);
this.container[key] = v;
}