rc-js-util
Version:
A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.
52 lines (26 loc) • 1.2 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [rc-js-util](./rc-js-util.md) > [IDebugProtectedViewFactory](./rc-js-util.idebugprotectedviewfactory.md)
## IDebugProtectedViewFactory interface
Factory for creating proxy objects that can be invalidated later. Once invalidated any property read that wasn't explicitly marked safe will cause a debug error. Available in debug contexts only.
**Signature:**
```typescript
export interface IDebugProtectedViewFactory extends TListener<"debugOnAllocate", []>
```
**Extends:** [TListener](./rc-js-util.tlistener.md)<!-- --><"debugOnAllocate", \[\]>
## Methods
<table><thead><tr><th>
Method
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[createProtectedView(view)](./rc-js-util.idebugprotectedviewfactory.createprotectedview.md)
</td><td>
Create a proxy to the view, if invalidate called then access of non `safeKeys` will cause a debug error.
</td></tr>
<tr><td>
[invalidate()](./rc-js-util.idebugprotectedviewfactory.invalidate.md)
</td><td>
Invalidates all previous views.
</td></tr>
</tbody></table>