@esportsplus/reactivity 0.1.23 → 0.1.24

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.
@@ -1,4 +1,4 @@
1
- import { Listener, Object, Options } from '../types';
1
+ import { Listener, Object, Options } from '~/types';
2
2
  import { ReactiveObject } from './object';
3
3
  type Events<T> = {
4
4
  fill: {
@@ -1,4 +1,4 @@
1
- import { dispose, signal } from '../signal';
1
+ import { dispose, signal } from '~/signal';
2
2
  import { ReactiveObject } from './object';
3
3
  function factory(data, options = {}) {
4
4
  let signals = [];
@@ -1,4 +1,4 @@
1
- import { Computed, Object, Options, Signal } from '../types';
1
+ import { Computed, Object, Options, Prettify, Signal } from '~/types';
2
2
  import { ReactiveArray, ReactiveObjectArray } from './array';
3
3
  import { ReactiveObject } from './object';
4
4
  type Guard<T> = T extends Object ? {
@@ -12,9 +12,7 @@ type Node<T> = T extends (...args: unknown[]) => unknown ? Computed<T> : T exten
12
12
  type Nodes<T extends Object> = {
13
13
  [K in keyof T]: Node<T[K]>;
14
14
  };
15
- declare const _default: <T extends Object>(data: Guard<T>, options?: Options) => { [K_1 in keyof T]: Infer<T[K_1]>; } & Omit<ReactiveObject<T>, "nodes"> & {
15
+ declare const _default: <T extends Object>(data: Guard<T>, options?: Options) => Prettify<{ [K in keyof T]: Infer<T[K]>; } & Omit<ReactiveObject<T>, "nodes"> & {
16
16
  nodes: Nodes<T>;
17
- } extends infer T_1 ? { [K in keyof T_1]: ({ [K_1 in keyof T]: Infer<T[K_1]>; } & Omit<ReactiveObject<T>, "nodes"> & {
18
- nodes: Nodes<T>;
19
- })[K]; } : never;
17
+ }>;
20
18
  export default _default;
@@ -1,4 +1,4 @@
1
- import { Computed, Object, Options, Signal } from '../types';
1
+ import { Computed, Object, Options, Signal } from '~/types';
2
2
  import { ReactiveArray, ReactiveObjectArray } from './array';
3
3
  type Node = Computed<any> | ReactiveArray<any> | ReactiveObjectArray<Object> | Signal<any>;
4
4
  declare class ReactiveObject<T extends Object> {
@@ -1,5 +1,5 @@
1
- import { computed, signal } from '../signal';
2
- import { defineProperty, isArray } from '../utilities';
1
+ import { computed, signal } from '~/signal';
2
+ import { defineProperty, isArray } from '~/utilities';
3
3
  import { ReactiveArray, ReactiveObjectArray } from './array';
4
4
  class ReactiveObject {
5
5
  nodes = {};
package/build/signal.d.ts CHANGED
@@ -20,11 +20,11 @@ declare class Reactive<T> {
20
20
  once<T>(event: Event, listener: Listener<T>): void;
21
21
  set(value: T): T;
22
22
  }
23
- declare const computed: <T>(fn: Computed<T>['fn'], options?: Options) => Computed<T>;
23
+ declare const computed: <T>(fn: Computed<T>["fn"], options?: Options) => Computed<T>;
24
24
  declare const dispose: <T extends {
25
25
  dispose: VoidFunction;
26
26
  }>(dispose?: T[] | T | null) => T | T[] | null | undefined;
27
- declare const effect: (fn: Effect['fn']) => Effect;
27
+ declare const effect: (fn: Effect["fn"]) => Effect;
28
28
  declare const root: <T>(fn: NeverAsync<(instance: Root) => T>, scheduler?: Scheduler) => T;
29
29
  declare const signal: <T>(value: T, options?: Options) => Signal<T>;
30
30
  export { computed, dispose, effect, root, signal };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "@esportsplus/custom-function": "^0.0.4"
5
5
  },
6
6
  "devDependencies": {
7
- "@esportsplus/typescript": "^0.1.2"
7
+ "@esportsplus/typescript": "^0.4.6"
8
8
  },
9
9
  "main": "build/index.js",
10
10
  "name": "@esportsplus/reactivity",
@@ -16,5 +16,5 @@
16
16
  "prepublishOnly": "npm run build"
17
17
  },
18
18
  "types": "build/index.d.ts",
19
- "version": "0.1.23"
19
+ "version": "0.1.24"
20
20
  }
package/tsconfig.json CHANGED
@@ -1,11 +1,3 @@
1
1
  {
2
- "compilerOptions": {
3
- "baseUrl": ".",
4
- "declaration": true,
5
- "declarationDir": "build",
6
- "outDir": "build"
7
- },
8
- "exclude": ["node_modules"],
9
- "extends": "./node_modules/@esportsplus/typescript/tsconfig.base.json",
10
- "include": ["src"]
2
+ "extends": "@esportsplus/typescript/tsconfig.package.json"
11
3
  }