Adds group configuration
This commit is contained in:
parent
0d9cf6a370
commit
154002f6f3
16 changed files with 633 additions and 20 deletions
|
|
@ -5,12 +5,13 @@ export class Container {
|
|||
|
||||
public set<T extends {constructor: {name: string}}>(instance: T, name: string|null = null): void
|
||||
{
|
||||
this.instances.set(name ?? instance.constructor.name, instance);
|
||||
const settingName = name ?? instance.constructor.name;
|
||||
this.instances.set(settingName.toLowerCase(), instance);
|
||||
}
|
||||
|
||||
public get<T>(name: string): T
|
||||
{
|
||||
return <T>this.instances.get(name);
|
||||
return <T>this.instances.get(name.toLowerCase());
|
||||
}
|
||||
|
||||
static getInstance(): Container {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue