fix(ui): stupid ts

This commit is contained in:
psychedelicious 2024-05-17 20:18:20 +10:00
parent fe7ed72c9c
commit 2cbf7d9221

View File

@ -160,7 +160,7 @@ const zStatefulFieldType = z.union([
export type StatefulFieldType = z.infer<typeof zStatefulFieldType>;
const statefulFieldTypeNames = zStatefulFieldType.options.map((o) => o.shape.name.value);
export const isStatefulFieldType = (fieldType: FieldType): fieldType is StatefulFieldType =>
statefulFieldTypeNames.includes(fieldType.name as any);
(statefulFieldTypeNames as string[]).includes(fieldType.name);
const zFieldType = z.union([zStatefulFieldType, zStatelessFieldType]);
export type FieldType = z.infer<typeof zFieldType>;
// #endregion