Create harmony-proxy-tests.ts

Create harmony-proxy-global-test.ts

Delete harmony-proxy-global-test.ts

Update harmony-proxy.d.ts

Update harmony-proxy-tests.ts

Update harmony-proxy-tests.ts

Update harmony-proxy-tests.ts

Update harmony-proxy-tests.ts

Update harmony-proxy-tests.ts
This commit is contained in:
Remo H. Jansen
2016-03-14 02:21:20 +00:00
committed by remojansen
parent 2e0490d06c
commit 91265f7398
2 changed files with 27 additions and 2 deletions
+27
View File
@@ -0,0 +1,27 @@
/// <reference path="./harmony-proxy.d.ts" />
import * as Proxy from "harmony-proxy";
interface IKatana {
use: () => void;
}
class Katana implements IKatana {
public use() {
console.log("Used Katana!");
}
}
let handler = {
apply: function(target: any, thisArg: any, argArray: any) {
console.log(`Starting: ${performance.now()}`);
let result = target.apply(thisArg, argArray);
console.log(`Finished: ${performance.now()}`);
return result;
}
};
let katana = new Katana();
let katanaProxy = new Proxy<IKatana>(katana, handler);
katanaProxy.use();
-2
View File
@@ -29,8 +29,6 @@ declare module harmonyProxy {
}
}
declare let Proxy: harmonyProxy.ProxyConstructor;
declare module "harmony-proxy" {
let _Proxy: harmonyProxy.ProxyConstructor;
export = _Proxy;