Skip to content

Commit 75fb56f

Browse files
committed
🧪 add Proxy example
1 parent 51c3ef7 commit 75fb56f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

playground/playground.ts

+22
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,28 @@ examples.make(() => {
425425
inspectMany(...objects);
426426
});
427427

428+
examples.only(() => {
429+
inspect(
430+
new Proxy(
431+
{
432+
type: "markdown",
433+
nodes: [
434+
{
435+
type: "paragraph",
436+
start: 0,
437+
end: 12,
438+
},
439+
],
440+
},
441+
{
442+
get(target, prop) {
443+
return target[prop];
444+
},
445+
},
446+
),
447+
);
448+
});
449+
428450
// ii → unwrap promise
429451
examples.make(() => {
430452
ii(Promise.resolve("hello"));

0 commit comments

Comments
 (0)