mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-28 07:40:30 -04:00
Merge from vscode 2b0b9136329c181a9e381463a1f7dc3a2d105a34 (#4880)
This commit is contained in:
@@ -95,7 +95,7 @@ export interface IInstantiationService {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
invokeFunction<R, TS extends any[]=[]>(fn: (accessor: ServicesAccessor, ...args: TS) => R, ...args: TS): R;
|
||||
invokeFunction<R, TS extends any[] = []>(fn: (accessor: ServicesAccessor, ...args: TS) => R, ...args: TS): R;
|
||||
|
||||
/**
|
||||
* Creates a child of this service which inherts all current services
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { illegalState } from 'vs/base/common/errors';
|
||||
import { create } from 'vs/base/common/types';
|
||||
import { Graph } from 'vs/platform/instantiation/common/graph';
|
||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
import { ServiceIdentifier, IInstantiationService, ServicesAccessor, _util, optional } from 'vs/platform/instantiation/common/instantiation';
|
||||
@@ -40,7 +39,7 @@ export class InstantiationService implements IInstantiationService {
|
||||
return new InstantiationService(services, this._strict, this);
|
||||
}
|
||||
|
||||
invokeFunction<R, TS extends any[]=[]>(fn: (accessor: ServicesAccessor, ...args: TS) => R, ...args: TS): R {
|
||||
invokeFunction<R, TS extends any[] = []>(fn: (accessor: ServicesAccessor, ...args: TS) => R, ...args: TS): R {
|
||||
let _trace = Trace.traceInvocation(fn);
|
||||
let _done = false;
|
||||
try {
|
||||
@@ -108,7 +107,7 @@ export class InstantiationService implements IInstantiationService {
|
||||
}
|
||||
|
||||
// now create the instance
|
||||
return <T>create.apply(null, [ctor].concat(args, serviceArgs));
|
||||
return <T>new ctor(...[...args, ...serviceArgs]);
|
||||
}
|
||||
|
||||
private _setServiceInstance<T>(id: ServiceIdentifier<T>, instance: T): void {
|
||||
|
||||
Reference in New Issue
Block a user