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.
167 lines (75 loc) • 2.37 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [rc-js-util](./rc-js-util.md) > [DebugProtectedView](./rc-js-util.debugprotectedview.md)
## DebugProtectedView class
Provides a view of an object that can be invalidated, causing attempts to access it to error in `_BUILD.DEBUG`<!-- -->.
**Signature:**
```typescript
export declare class DebugProtectedView<TView extends object> implements IDebugProtectedViewFactory
```
**Implements:** [IDebugProtectedViewFactory](./rc-js-util.idebugprotectedviewfactory.md)
## Remarks
Allows the specification of `safeKeys`<!-- -->, accessing of these is not an error regardless of invalidation state.
## Constructors
<table><thead><tr><th>
Constructor
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[(constructor)(debugInfo, safeKeys)](./rc-js-util.debugprotectedview._constructor_.md)
</td><td>
</td><td>
Constructs a new instance of the `DebugProtectedView` class
</td></tr>
</tbody></table>
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[createTypedArrayView](./rc-js-util.debugprotectedview.createtypedarrayview.md)
</td><td>
`static`
</td><td>
<TCtor extends [TTypedArrayCtor](./rc-js-util.ttypedarrayctor.md)<!-- -->>(instanceName: string) => [DebugProtectedView](./rc-js-util.debugprotectedview.md)<!-- --><InstanceType<TCtor>>
</td><td>
</td></tr>
</tbody></table>
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[createProtectedView(view)](./rc-js-util.debugprotectedview.createprotectedview.md)
</td><td>
</td><td>
</td></tr>
<tr><td>
[debugOnAllocate()](./rc-js-util.debugprotectedview.debugonallocate.md)
</td><td>
</td><td>
</td></tr>
<tr><td>
[invalidate()](./rc-js-util.debugprotectedview.invalidate.md)
</td><td>
</td><td>
</td></tr>
<tr><td>
[unwrapProtectedView(view)](./rc-js-util.debugprotectedview.unwrapprotectedview.md)
</td><td>
`static`
</td><td>
</td></tr>
</tbody></table>