Pull render service off instantiation service safely
This commit is contained in:
@@ -36,7 +36,7 @@ export class ServiceCollection {
|
||||
return this._entries.has(id);
|
||||
}
|
||||
|
||||
get<T>(id: IServiceIdentifier<T>): T {
|
||||
get<T>(id: IServiceIdentifier<T>): T | undefined {
|
||||
return this._entries.get(id);
|
||||
}
|
||||
}
|
||||
@@ -52,6 +52,10 @@ export class InstantiationService implements IInstantiationService {
|
||||
this._services.set(id, instance);
|
||||
}
|
||||
|
||||
public getService<T>(id: IServiceIdentifier<T>): T | undefined {
|
||||
return this._services.get(id);
|
||||
}
|
||||
|
||||
public createInstance<T>(ctor: any, ...args: any[]): any {
|
||||
const serviceDependencies = getServiceDependencies(ctor).sort((a, b) => a.index - b.index);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user