You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like it is currently impossible to use TypeScript type guard on fields like this:
constdefaultValue: string|undefined=action.fields.filter((field): field is TextField=>field.type==='text').find(field=>field.name==='my-field-name'&&field.type==='text')?.value// TS2322: Type// string | number | boolean | Date | null | undefined// is not assignable to type string | undefined
Could BaseField and its children be exported to allow this?
The text was updated successfully, but these errors were encountered:
It looks like it is currently impossible to use TypeScript type guard on fields like this:
Could
BaseField
and its children be exported to allow this?The text was updated successfully, but these errors were encountered: