diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index b0c98a8..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "deno.cacheOnSave": true, - "deno.codeLens.test": true -} \ No newline at end of file diff --git a/deno.json b/deno.json index e1aa6b8..bbb3e72 100644 --- a/deno.json +++ b/deno.json @@ -6,5 +6,8 @@ "DOM" ], "types": ["./types.d.ts"] + }, + "imports": { + "entry":"./app.js" } } \ No newline at end of file diff --git a/index.html b/index.html index 9edf7ff..5e6e962 100644 --- a/index.html +++ b/index.html @@ -9,6 +9,22 @@ - + \ No newline at end of file diff --git a/proxy.js b/proxy.js deleted file mode 100644 index 60ae474..0000000 --- a/proxy.js +++ /dev/null @@ -1,40 +0,0 @@ -//const person = van.state({name:"seth", age:41}); -//console.log(Object.hasOwn(person, "rawVal")); - -/** @type {(obj:T, key:string)=>T} */ -const Deep =(obj, key)=> -{ - - const proxInner =(context, key)=> new Proxy({}, { - get(_, prop) - { - if(typeof prop === "string") - { - const path = key+" . "+prop; - console.log(path, "accessed!"); - const value = context[prop]; - - return proxInner(value, path); - } - else - { - return context[prop] - } - } - }); - - const proxOuter = new Proxy({}, { - get(_, prop) - { - return proxInner(obj, prop); - }, - set(_, prop, val) - { - obj[prop] = val; - } - }); - - return proxOuter; -} - -export default Deep; \ No newline at end of file diff --git a/proxy.test.ts b/proxy.test.ts deleted file mode 100644 index a86ebae..0000000 --- a/proxy.test.ts +++ /dev/null @@ -1,10 +0,0 @@ -import * as assert from "jsr:@std/assert"; -import Deep from "./proxy.js"; - -Deno.test("proxy", ()=>{ - - const d1 = Deep({name:"seth", age:41, tags:[]}, "p1"); - const dig = d1.name; - //const dig2 = dig.so.deep; - -}); \ No newline at end of file