mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-28 07:40:30 -04:00
Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998 (#7880)
* Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998 * fix pipelines * fix strict-null-checks * add missing files
This commit is contained in:
@@ -219,13 +219,23 @@ export class InstantiationService implements IInstantiationService {
|
||||
// Return a proxy object that's backed by an idle value. That
|
||||
// strategy is to instantiate services in our idle time or when actually
|
||||
// needed but not when injected into a consumer
|
||||
const idle = new IdleValue(() => this._createInstance<T>(ctor, args, _trace));
|
||||
const idle = new IdleValue<any>(() => this._createInstance<T>(ctor, args, _trace));
|
||||
return <T>new Proxy(Object.create(null), {
|
||||
get(_target: T, prop: PropertyKey): any {
|
||||
return (idle.getValue() as any)[prop];
|
||||
get(target: any, key: PropertyKey): any {
|
||||
if (key in target) {
|
||||
return target[key];
|
||||
}
|
||||
let obj = idle.getValue();
|
||||
let prop = obj[key];
|
||||
if (typeof prop !== 'function') {
|
||||
return prop;
|
||||
}
|
||||
prop = prop.bind(obj);
|
||||
target[key] = prop;
|
||||
return prop;
|
||||
},
|
||||
set(_target: T, p: PropertyKey, value: any): boolean {
|
||||
(idle.getValue() as any)[p] = value;
|
||||
idle.getValue()[p] = value;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@@ -242,7 +252,7 @@ const enum TraceType {
|
||||
// {{SQL CARBON EDIT}} - Export trace
|
||||
export class Trace {
|
||||
|
||||
private static _None = new class extends Trace {
|
||||
private static readonly _None = new class extends Trace {
|
||||
constructor() { super(-1, null); }
|
||||
stop() { }
|
||||
branch() { return this; }
|
||||
|
||||
Reference in New Issue
Block a user