mirror of
https://github.com/morluto/rea.git
synced 2026-10-27 09:55:46 +00:00
23 lines
593 B
TypeScript
23 lines
593 B
TypeScript
import type { JavaScriptSemanticGraphRelation } from "./javascriptSemanticGraphSchemas.js";
|
|
|
|
const OWNERSHIP_RELATIONS = new Set<
|
|
JavaScriptSemanticGraphRelation["relation"]
|
|
>([
|
|
"acquires",
|
|
"aggregates",
|
|
"awaits",
|
|
"chains",
|
|
"connects-stdio",
|
|
"creates-promise",
|
|
"detaches-task",
|
|
"owns",
|
|
"releases",
|
|
"returns-task",
|
|
"spawns",
|
|
]);
|
|
|
|
/** Whether one relation participates in bidirectional ownership traversal. */
|
|
export const isJavaScriptSemanticOwnershipRelation = (
|
|
relation: JavaScriptSemanticGraphRelation["relation"],
|
|
): boolean => OWNERSHIP_RELATIONS.has(relation);
|