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.
17 lines • 692 B
TypeScript
import type { TListener } from "../eventing/t-listener.js";
/**
* @public
* 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.
*/
export interface IDebugProtectedViewFactory extends TListener<"debugOnAllocate", []> {
/**
* Invalidates all previous views.
*/
invalidate(): void;
/**
* Create a proxy to the view, if invalidate called then access of non `safeKeys` will cause a debug error.
*/
createProtectedView<T extends object>(view: T): T;
}
//# sourceMappingURL=i-debug-protected-view-factory.d.ts.map