MCPcopy Index your code
hub / github.com/github/copilot-sdk / propertyReferencesInternal

Function propertyReferencesInternal

scripts/codegen/utils.ts:842–856  ·  view source on GitHub ↗
(propSchema: JSONSchema7)

Source from the content-addressed store, hash-verified

840
841 /** Returns true when a property's *direct* type carrier is an internal definition. */
842 const propertyReferencesInternal = (propSchema: JSONSchema7): boolean => {
843 const direct = refToName((propSchema as Record<string, unknown>).$ref);
844 if (direct && internalTypeNames.has(direct)) return true;
845 const items = (propSchema as Record<string, unknown>).items;
846 if (items && typeof items === "object" && !Array.isArray(items)) {
847 const itemsRef = refToName((items as Record<string, unknown>).$ref);
848 if (itemsRef && internalTypeNames.has(itemsRef)) return true;
849 }
850 const addl = (propSchema as Record<string, unknown>).additionalProperties;
851 if (addl && typeof addl === "object") {
852 const addlRef = refToName((addl as Record<string, unknown>).$ref);
853 if (addlRef && internalTypeNames.has(addlRef)) return true;
854 }
855 return false;
856 };
857
858 const visit = (node: unknown): void => {
859 if (!node || typeof node !== "object") return;

Callers 1

visitFunction · 0.85

Calls 1

refToNameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…