* 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)
| 105 | * Returns `null` when the interface isn't declared in the expected shape. |
| 106 | */ |
| 107 | function 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. |
no outgoing calls
no test coverage detected