// Should be used for attributes that are optional booleans, where true, false, and undefined all
// have separate meanings and must have distinct representations.
export const optionalBooleanConverter = {
    toView(value) {
        return typeof value === 'boolean' ? value.toString() : null;
    },
    fromView(value) {
        if (value === 'true' || value === true) {
            return true;
        }
        if (value === 'false' || value === false) {
            return false;
        }
        return undefined;
    }
};
//# sourceMappingURL=converter.js.map