/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import type { ExtractedContext } from "@fluid-experimental/property-changeset"; import { DataBinder, DataBinding } from "../index.js"; export interface ActivationInfo { dataBinder: DataBinder; userData: any; } export interface ActivationType { bindingConstructor?: typeof DataBinding; activationSplitType: ExtractedContext | undefined; bindingType: string; startPath: string; includePrefix: string; excludePrefix: string; exactPath: string; activationInfo: ActivationInfo; } export interface TypeCacheEntry { rule: ActivationType; definition: any; } /** * The ActivationQueryCacheHelper is a helper class to be able to cache whether there is the _possibility_ of * a binding in the hierarchy of a property, based on the _static_ definition of the type. * The mechanism searches in the type, and checks if any of the statically defined children may have bindings * for the given binding type. If it finds a node property, it cannot conclude anything, and will conservatively * return 'true', that a binding may be encountered. * * @hidden */ export declare class ActivationQueryCacheHelper { _activations: ActivationType[]; _dataBinder: DataBinder; _workspace: any; _childrenCache: {}; _hierarchyCache: {}; _typeCache: Record | {}; /** * Constructor of the helper. * * @param in_activations - the activations that are being performed * @param in_dataBinder - the databinder instance */ constructor(in_activations: ActivationType[], in_dataBinder: DataBinder); /** * Returns true if there is a chance that one of our relevant types might be found in one of the children * properties of a property of the given typeid. * * @param in_typeid - the typeid for which we are interested * @returns true if the given type may occur in the children subhierarchies */ childrenMayHaveBindings(in_typeid: string): boolean; /** * Returns true if there is a chance that one of the properties in the hierarchy of the given types may * potentially contain a databinding, _including_ the root. * * @param in_typeid - the typeid for which we are interested * @returns true if a databinding may occur in the subhierarchy of a property of the given type, * including the root */ hierarchyMayHaveBindings(in_typeid: string): boolean; /** * Return whether the root of the hierarchy defined by the type provided has a binding. * * @param in_typeid - the typeid for which we are interested * * @returns The root of the type that (children not checked) has a binding otherwise undefined */ typeRootBindings(in_typeid: string): TypeCacheEntry[]; /** * Get the direct inherits of the given typeid * * @param in_typeid - the typeid from which we want to get the inherited types * * @returns all the inheriting types */ _getInheritedTypes(in_typeid: string): string[]; /** * Returns true if the context is a collection context * * @param in_splitType - the split type to check * @returns true if the type provided is a collection */ _isCollectionType(in_splitType: ExtractedContext): boolean; } //# sourceMappingURL=activationQueryCacheHelper.d.ts.map