Creates a strict proxy wrapper around an object that throws an error when accessing non-existent properties.
This function wraps the provided object in a Proxy that intercepts property access operations.
If an attempt is made to access a property that doesn't exist on the object, a SystemError
is thrown instead of returning undefined. This helps catch typos and invalid property accesses
at runtime.
Type Parameters
Textendsobject
The type of the object to be wrapped, must extend Object.
Creates a strict proxy wrapper around an object that throws an error when accessing non-existent properties.
This function wraps the provided object in a Proxy that intercepts property access operations. If an attempt is made to access a property that doesn't exist on the object, a SystemError is thrown instead of returning undefined. This helps catch typos and invalid property accesses at runtime.