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.
16 lines • 898 B
TypeScript
import { type IManagedObject, type IManagedResourceNode, IPointer, PointerDebugMetadata } from "../../lifecycle/manged-resources.js";
import { IDebugProtectedViewFactory } from "../../debug/i-debug-protected-view-factory.js";
/**
* @public
* Defines the rules for how {@link IManagedObject}s should be cleaned up.
*/
export interface ILifecycleStrategy {
/**
* Conceptually, there is always an owner. if you supply null, the resource is owned by a block scope; it is a
* (debug) error to create a node without one or the other.
*/
createNode(owner: IManagedResourceNode | null): IManagedResourceNode;
onManagedObjectCreated(object: IManagedObject): void;
onSharedPointerCreated(sharedPtr: IManagedObject & IPointer, metadata: PointerDebugMetadata, protectedViewFactory: IDebugProtectedViewFactory | null): void;
}
//# sourceMappingURL=i-lifecycle-strategy.d.ts.map