@open-formulieren/formio-builder
Version:
An opinionated Formio webform builder for Open Forms
19 lines (18 loc) • 884 B
JavaScript
// A type guard is needed because TS cannot figure out it's a discriminated union
// when the discriminator is nested.
// See https://github.com/microsoft/TypeScript/issues/18758
export const checkIsManualOptions = (component) => {
return component.openForms.dataSrc === 'manual';
};
// A type guard is needed because TS cannot figure out it's a discriminated union
// when the discriminator is nested.
// See https://github.com/microsoft/TypeScript/issues/18758
export const checkIsReferenceListsOptions = (component) => {
return component.openForms.dataSrc === 'referenceLists';
};
// A type guard is needed because TS cannot figure out it's a discriminated union
// when the discriminator is nested.
// See https://github.com/microsoft/TypeScript/issues/18758
export const checkIsVariableOptions = (component) => {
return component.openForms.dataSrc === 'variable';
};