@open-formulieren/formio-builder
Version:
An opinionated Formio webform builder for Open Forms
25 lines (24 loc) • 1.23 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkIsVariableOptions = exports.checkIsReferenceListsOptions = exports.checkIsManualOptions = void 0;
// 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
const checkIsManualOptions = (component) => {
return component.openForms.dataSrc === 'manual';
};
exports.checkIsManualOptions = checkIsManualOptions;
// 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
const checkIsReferenceListsOptions = (component) => {
return component.openForms.dataSrc === 'referenceLists';
};
exports.checkIsReferenceListsOptions = checkIsReferenceListsOptions;
// 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
const checkIsVariableOptions = (component) => {
return component.openForms.dataSrc === 'variable';
};
exports.checkIsVariableOptions = checkIsVariableOptions;