MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / findNativePropsBody

Function findNativePropsBody

src/resolution/frameworks/fabric.ts:107–111  ·  view source on GitHub ↗

* Pull the `NativeProps` interface body out of a Fabric spec source. * Returns `null` when the interface isn't declared in the expected shape.

(source: string)

Source from the content-addressed store, hash-verified

105 * Returns `null` when the interface isn't declared in the expected shape.
106 */
107function findNativePropsBody(source: string): string | null {
108 // Permissive: `export interface NativeProps [extends X, Y] { … }`.
109 const m = source.match(/export\s+interface\s+NativeProps\b[^{]*\{([\s\S]*?)\n\}/);
110 return m?.[1] ?? null;
111}
112
113/**
114 * Parse the NativeProps interface body and return prop names.

Callers 1

extractFabricNodesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected