Files
NapCatQQ/.pnpm-store/v3/files/5e/f8effdee98ede36e8951037bd361710a0a244a2b83851487a8a15891218c456b5e7010335979c226bff5b97d4deaf6da6847a7c828671843a8241a8dcdfe2d
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

24 lines
1.4 KiB
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.removeRootServiceNodeBindingIfContextFree = removeRootServiceNodeBindingIfContextFree;
const buildPlanBindingConstraintsList_1 = require("../calculations/buildPlanBindingConstraintsList");
const LazyPlanServiceNode_1 = require("../models/LazyPlanServiceNode");
const removeServiceNodeBindingIfContextFree_1 = require("./removeServiceNodeBindingIfContextFree");
/**
* Detach a binding to the root service node if it is context-free.
* @param params The plan parameters.
* @param serviceNode The service node to attach the binding to.
* @param binding The binding to attach.
* @returns True if the binding requires ancestor metadata, false otherwise.
*/
function removeRootServiceNodeBindingIfContextFree(params, serviceNode, binding) {
if (LazyPlanServiceNode_1.LazyPlanServiceNode.is(serviceNode) && !serviceNode.isExpanded()) {
return {
bindingNodeRemoved: undefined,
isContextFreeBinding: true,
};
}
const bindingConstraintsList = (0, buildPlanBindingConstraintsList_1.buildPlanBindingConstraintsList)(params);
return (0, removeServiceNodeBindingIfContextFree_1.removeServiceNodeBindingIfContextFree)(serviceNode, binding, bindingConstraintsList, params.rootConstraints.isOptional ?? false);
}
//# sourceMappingURL=removeRootServiceNodeBindingIfContextFree.js.map