@torpor/view 1.1.3 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compile.cjs +389 -124
- package/dist/compile.d.cts +18 -11
- package/dist/compile.d.cts.map +1 -1
- package/dist/compile.d.mts +18 -11
- package/dist/compile.d.mts.map +1 -1
- package/dist/compile.mjs +389 -124
- package/dist/compile.mjs.map +1 -1
- package/dist/index.cjs +1 -4
- package/dist/index.mjs +1 -4
- package/dist/index.mjs.map +1 -1
- package/dist/ssr.cjs +75 -0
- package/dist/ssr.d.cts +48 -0
- package/dist/ssr.d.cts.map +1 -1
- package/dist/ssr.d.mts +48 -0
- package/dist/ssr.d.mts.map +1 -1
- package/dist/ssr.mjs +42 -1
- package/dist/ssr.mjs.map +1 -1
- package/package.json +11 -11
package/dist/index.cjs
CHANGED
|
@@ -2759,10 +2759,7 @@ function $bind(state, props, ...keys) {
|
|
|
2759
2759
|
* @param fn The function containing the signals to compute and cache.
|
|
2760
2760
|
*/
|
|
2761
2761
|
function $cache(fn) {
|
|
2762
|
-
if (context.registerComputed === null)
|
|
2763
|
-
if (typeof window !== "undefined") throw new Error("$cache must be used in a getter");
|
|
2764
|
-
return fn();
|
|
2765
|
-
}
|
|
2762
|
+
if (context.registerComputed === null) throw new Error("$cache must be used in a getter");
|
|
2766
2763
|
let computed = {
|
|
2767
2764
|
type: 1,
|
|
2768
2765
|
isAsync: false,
|
package/dist/index.mjs
CHANGED
|
@@ -2758,10 +2758,7 @@ function $bind(state, props, ...keys) {
|
|
|
2758
2758
|
* @param fn The function containing the signals to compute and cache.
|
|
2759
2759
|
*/
|
|
2760
2760
|
function $cache(fn) {
|
|
2761
|
-
if (context.registerComputed === null)
|
|
2762
|
-
if (typeof window !== "undefined") throw new Error("$cache must be used in a getter");
|
|
2763
|
-
return fn();
|
|
2764
|
-
}
|
|
2761
|
+
if (context.registerComputed === null) throw new Error("$cache must be used in a getter");
|
|
2765
2762
|
let computed = {
|
|
2766
2763
|
type: 1,
|
|
2767
2764
|
isAsync: false,
|