diff --git a/lib/core/src/helpers/computed.ts b/lib/core/src/helpers/computed.ts index ba517df212..e819202827 100644 --- a/lib/core/src/helpers/computed.ts +++ b/lib/core/src/helpers/computed.ts @@ -87,3 +87,7 @@ export class Computed { return this._value as T; } } + +export function computed(compute: () => T, dependencies: D | (() => D)) { + return new Computed(compute, dependencies); +}