提交 a144e2fa 编写于 作者: J Johannes Rieken

insta - implement set trap

上级 74b73dfa
......@@ -19,8 +19,12 @@ export class InstantiationService extends BaseInstantiationService {
private static _newIdleProxyService<T>(executor: () => T): T {
const idle = new IdleValue(executor);
return <T>new Proxy(Object.create(null), {
get(_target, prop) {
get(_target: T, prop: PropertyKey): any {
return idle.getValue()[prop];
},
set(_target: T, p: PropertyKey, value: any): boolean {
idle.getValue()[p] = value;
return true;
}
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册