Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/web_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ jobs:
steps:
- uses: actions/checkout@v6

- name: Check for z.infer usage
run: |
RESULTS=$(grep -r --include="*.ts" --exclude-dir="node_modules" "z\.infer" renderers | grep -v "v0_9/catalog/types" || true)
if [ -n "$RESULTS" ]; then
echo "Error: z.infer found in codebase! Use manual interfaces instead to ensure Closure Compiler compatibility."
echo "Instead of: type Foo = z.infer<typeof Schema>;"
echo "Do: interface Foo { ... } AND const Schema: z.ZodType<Foo> = z.object({ ... });"
echo "$RESULTS"
exit 1
fi

- name: Set up Node.js
uses: actions/setup-node@v6
with:
Expand Down
4 changes: 1 addition & 3 deletions renderers/react/src/v0_8/components/content/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ export const Image = memo(function Image({node, surfaceId}: A2UIComponentProps<T
const props = node.properties;

const url = resolveString(props.url);
const altText = resolveString(
(props as Record<string, unknown>).altText as Types.StringValue | undefined
);
const altText = resolveString(props.altText);
const usageHint = props.usageHint as UsageHint | undefined;
const fit = (props.fit as FitMode) ?? 'fill';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
const label = resolveString(props.label);
const textPath = props.text?.path;
const initialValue = resolveString(props.text) ?? '';
const propsRecord = props as Record<string, unknown>;
const fieldType = (propsRecord.textFieldType || propsRecord.type) as TextFieldType;
const fieldType = (props.textFieldType || (props as any).type) as TextFieldType;

Check warning on line 41 in renderers/react/src/v0_8/components/interactive/TextField.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
const validationRegexp = props.validationRegexp;

const [value, setLocalValue] = useState(initialValue);
Expand Down
Loading
Loading