{
"import": [
"mizchi/js",
"mizchi/js/builtins/proxy"
]
}fn main {
let target = @core.Object::new()
let handler = @core.Object::new()
// Create a proxy
let proxy = @proxy.Proxy::new(target, handler)
// The proxy intercepts operations on the target object
}#external
pub type Proxyfn Proxy::new(target : Any, get? : (Any, Any, Any) -> Any, set? : (Any, Any, Any, Any) -> Bool, has? : (Any, Any) -> Bool, deleteProperty? : (Any, Any) -> Bool, apply? : (Any, Any, Any) -> Any, construct? : (Any, Any, Any) -> Any, ownKeys? : (Any) -> Any, getPrototypeOf? : (Any) -> Any, setPrototypeOf? : (Any, Any) -> Bool, isExtensible? : (Any) -> Bool, preventExtensions? : (Any) -> Bool, getOwnPropertyDescriptor? : (Any, Any) -> Any, defineProperty? : (Any, Any, Any) -> Bool) -> Proxylet target = @core.new_object()
let _proxy = Proxy::new(@core.any(target), get=fn(_target, _prop, _receiver) {
@core.any("value")
})fn Proxy::revocable(target : Any, get? : (Any, Any, Any) -> Any, set? : (Any, Any, Any, Any) -> Bool, has? : (Any, Any) -> Bool, deleteProperty? : (Any, Any) -> Bool, apply? : (Any, Any, Any) -> Any, construct? : (Any, Any, Any) -> Any, ownKeys? : (Any) -> Any, getPrototypeOf? : (Any) -> Any, setPrototypeOf? : (Any, Any) -> Bool, isExtensible? : (Any) -> Bool, preventExtensions? : (Any) -> Bool, getOwnPropertyDescriptor? : (Any, Any) -> Any, defineProperty? : (Any, Any, Any) -> Bool) -> Anyjs bindings for builtins/web/node/deno/bun (browser APIs split to mizchi/js_browser)
Dependencies