"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = eagerComputed;
var _vueDemi = require("vue-demi");
function eagerComputed(fn) {
  const result = (0, _vueDemi.shallowRef)();
  (0, _vueDemi.watchEffect)(() => {
    result.value = fn();
  }, {
    flush: 'sync' // needed so updates are immediate.
  });
  return result;
}