Fix TypeScript strict null check errors

Add optional chaining and null checks in build scripts to handle
potentially undefined array elements. Add style prop to Card, Badge,
and Placeholder components, and onClick prop to Text component to
support inline styling in screen components.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Sylvain Duchesne
2026-01-18 21:16:21 +01:00
parent fd5fab5bd2
commit 9cc916e8bc
7 changed files with 23 additions and 16 deletions
+2 -2
View File
@@ -60,8 +60,8 @@ function extractStepDefinitions(): StepDefinition[] {
function extractFunctionBody(lines: string[], startLine: number): string {
// Look for the closing }); which marks the end of a step definition
for (let i = startLine; i < lines.length; i++) {
const line = lines[i].trim();
if (line === '});' || line.endsWith('});')) {
const line = lines[i]?.trim();
if (line === '});' || line?.endsWith('});')) {
const extracted = lines.slice(startLine, i + 1);
return extracted.join('\n');
}