@tstdl/base 0.85.3 → 0.85.4
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tstdl/base",
|
|
3
|
-
"version": "0.85.
|
|
3
|
+
"version": "0.85.4",
|
|
4
4
|
"author": "Patrick Hein",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"@types/mjml": "4.7",
|
|
34
34
|
"@types/node": "20",
|
|
35
35
|
"@types/nodemailer": "6.4",
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
37
|
-
"@typescript-eslint/parser": "5.
|
|
36
|
+
"@typescript-eslint/eslint-plugin": "5.61",
|
|
37
|
+
"@typescript-eslint/parser": "5.61",
|
|
38
38
|
"concurrently": "8.2",
|
|
39
39
|
"esbuild": "0.18",
|
|
40
|
-
"eslint": "8.
|
|
40
|
+
"eslint": "8.44",
|
|
41
41
|
"eslint-import-resolver-typescript": "3.5",
|
|
42
42
|
"eslint-plugin-import": "2.27",
|
|
43
43
|
"tsc-alias": "1.8",
|
package/signals/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as Types from './implementation/index.js';
|
|
2
|
-
export type { CreateComputedOptions, CreateEffectOptions, CreateSignalOptions, EffectRef, Signal, WritableSignal } from './implementation/index.js';
|
|
2
|
+
export type { CreateComputedOptions, CreateEffectOptions, CreateSignalOptions, EffectCleanupRegisterFn, EffectRef, Signal, WritableSignal } from './implementation/index.js';
|
|
3
3
|
export type SignalsConfiguration = {
|
|
4
4
|
signal: typeof Types.signal;
|
|
5
5
|
computed: typeof Types.computed;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var effect_with_dependencies_exports = {};
|
|
20
|
+
__export(effect_with_dependencies_exports, {
|
|
21
|
+
effectWithDependencies: () => effectWithDependencies
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(effect_with_dependencies_exports);
|
|
24
|
+
var import_api = require("./api.js");
|
|
25
|
+
function effectWithDependencies(effectFn, dependencies, options) {
|
|
26
|
+
function effectFnWithDependencies(onCleanup) {
|
|
27
|
+
for (let i = 0; i < dependencies.length; i++) {
|
|
28
|
+
dependencies[i]();
|
|
29
|
+
}
|
|
30
|
+
effectFn(onCleanup);
|
|
31
|
+
}
|
|
32
|
+
return (0, import_api.effect)(dependencies.length == 0 ? effectFn : effectFnWithDependencies, options);
|
|
33
|
+
}
|
package/signals/index.d.ts
CHANGED
package/signals/index.js
CHANGED
|
@@ -17,4 +17,5 @@ var signals_exports = {};
|
|
|
17
17
|
module.exports = __toCommonJS(signals_exports);
|
|
18
18
|
__reExport(signals_exports, require("./api.js"), module.exports);
|
|
19
19
|
__reExport(signals_exports, require("./computed-with-dependencies.js"), module.exports);
|
|
20
|
+
__reExport(signals_exports, require("./effect-with-dependencies.js"), module.exports);
|
|
20
21
|
__reExport(signals_exports, require("./pipe.js"), module.exports);
|