@tomorrowevening/theatre-dataverse 1.0.0 → 1.0.1

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.
Files changed (38) hide show
  1. package/dist/Atom.d.ts +85 -127
  2. package/dist/Atom.d.ts.map +1 -1
  3. package/dist/Atom.test.d.ts +2 -0
  4. package/dist/Atom.test.d.ts.map +1 -0
  5. package/dist/PointerProxy.d.ts +33 -33
  6. package/dist/Ticker.d.ts +105 -105
  7. package/dist/Ticker.test.d.ts +2 -0
  8. package/dist/Ticker.test.d.ts.map +1 -0
  9. package/dist/atom.typeTest.d.ts +2 -2
  10. package/dist/dataverse.test.d.ts +2 -0
  11. package/dist/dataverse.test.d.ts.map +1 -0
  12. package/dist/index.d.ts +19 -19
  13. package/dist/index.js +30 -13
  14. package/dist/index.js.map +2 -2
  15. package/dist/integration.test.d.ts +2 -0
  16. package/dist/integration.test.d.ts.map +1 -0
  17. package/dist/pointer.d.ts +107 -107
  18. package/dist/pointer.test.d.ts +2 -0
  19. package/dist/pointer.test.d.ts.map +1 -0
  20. package/dist/pointer.typeTest.d.ts +2 -2
  21. package/dist/pointerToPrism.d.ts +20 -20
  22. package/dist/prism/Interface.d.ts +33 -33
  23. package/dist/prism/asyncIterateOver.d.ts +1 -1
  24. package/dist/prism/discoveryMechanism.d.ts +4 -4
  25. package/dist/prism/iterateAndCountTicks.d.ts +7 -7
  26. package/dist/prism/iterateOver.d.ts +4 -4
  27. package/dist/prism/iterateOver.test.d.ts +2 -0
  28. package/dist/prism/iterateOver.test.d.ts.map +1 -0
  29. package/dist/prism/prism.d.ts +1 -1
  30. package/dist/prism/prism.test.d.ts +2 -0
  31. package/dist/prism/prism.test.d.ts.map +1 -0
  32. package/dist/setupTestEnv.d.ts +2 -2
  33. package/dist/types.d.ts +6 -6
  34. package/dist/utils/Stack.d.ts +16 -16
  35. package/dist/utils/typeTestUtils.d.ts +11 -11
  36. package/dist/utils/updateDeep.d.ts +3 -3
  37. package/dist/val.d.ts +14 -14
  38. package/package.json +7 -10
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=integration.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration.test.d.ts","sourceRoot":"","sources":["../src/integration.test.ts"],"names":[],"mappings":""}
package/dist/pointer.d.ts CHANGED
@@ -1,107 +1,107 @@
1
- import type { $IntentionalAny } from './types';
2
- type PathToProp = Array<string | number>;
3
- export type PointerMeta = {
4
- root: {};
5
- path: (string | number)[];
6
- };
7
- export type UnindexableTypesForPointer = number | string | boolean | null | void | undefined | Function;
8
- export type UnindexablePointer = {
9
- [K in $IntentionalAny]: Pointer<undefined>;
10
- };
11
- /**
12
- * A wrapper type for the type a `Pointer` points to.
13
- */
14
- export type PointerType<O> = {
15
- /**
16
- * Only accessible via the type system.
17
- * This is a helper for getting the underlying pointer type
18
- * via the type space.
19
- */
20
- $$__pointer_type: O;
21
- };
22
- /**
23
- * The type of {@link Atom} pointers. See {@link pointer|pointer()} for an
24
- * explanation of pointers.
25
- *
26
- * @see Atom
27
- *
28
- * @remarks
29
- * The Pointer type is quite tricky because it doesn't play well with `any` and other inexact types.
30
- * Here is an example that one would expect to work, but currently doesn't:
31
- * ```ts
32
- * declare function expectAnyPointer(pointer: Pointer<any>): void
33
- *
34
- * expectAnyPointer(null as Pointer<{}>) // this shows as a type error because Pointer<{}> is not assignable to Pointer<any>, even though it should
35
- * ```
36
- *
37
- * The current solution is to just avoid using `any` with pointer-related code (or type-test it well).
38
- * But if you enjoy solving typescript puzzles, consider fixing this :)
39
- * Potentially, [TypeScript variance annotations in 4.7+](https://devblogs.microsoft.com/typescript/announcing-typescript-4-7-beta/#optional-variance-annotations-for-type-parameters)
40
- * might be able to help us.
41
- */
42
- export type Pointer<O> = PointerType<O> & PointerInner<Exclude<O, undefined>, undefined extends O ? undefined : never>;
43
- type PointerInner<O, Optional> = O extends UnindexableTypesForPointer ? UnindexablePointer : unknown extends O ? UnindexablePointer : O extends (infer T)[] ? Pointer<T>[] : O extends {} ? {
44
- [K in keyof O]-?: Pointer<O[K] | Optional>;
45
- } : UnindexablePointer;
46
- /**
47
- * Returns the metadata associated with the pointer. Usually the root object and
48
- * the path.
49
- *
50
- * @param p - The pointer.
51
- */
52
- export declare const getPointerMeta: <_>(p: PointerType<_>) => PointerMeta;
53
- /**
54
- * Returns the root object and the path of the pointer.
55
- *
56
- * @example
57
- * ```ts
58
- * const {root, path} = getPointerParts(pointer)
59
- * ```
60
- *
61
- * @param p - The pointer.
62
- *
63
- * @returns An object with two properties: `root`-the root object or the pointer, and `path`-the path of the pointer. `path` is an array of the property-chain.
64
- */
65
- export declare const getPointerParts: <_>(p: Pointer<_>) => {
66
- root: {};
67
- path: PathToProp;
68
- };
69
- /**
70
- * Creates a pointer to a (nested) property of an {@link Atom}.
71
- *
72
- * @remarks
73
- * Pointers are used to make prisms of properties or nested properties of
74
- * {@link Atom|Atoms}.
75
- *
76
- * Pointers also allow easy construction of new pointers pointing to nested members
77
- * of the root object, by simply using property chaining. E.g. `somePointer.a.b` will
78
- * create a new pointer that has `'a'` and `'b'` added to the path of `somePointer`.
79
- *
80
- * @example
81
- * ```ts
82
- * // Here, sum is a prism that updates whenever the a or b prop of someAtom does.
83
- * const sum = prism(() => {
84
- * return val(pointer({root: someAtom, path: ['a']})) + val(pointer({root: someAtom, path: ['b']}));
85
- * });
86
- *
87
- * // Note, atoms have a convenience Atom.pointer property that points to the root,
88
- * // which you would normally use in this situation.
89
- * const sum = prism(() => {
90
- * return val(someAtom.pointer.a) + val(someAtom.pointer.b);
91
- * });
92
- * ```
93
- *
94
- * @param args - The pointer parameters.
95
- *
96
- * @typeParam O - The type of the value being pointed to.
97
- */
98
- declare function pointer<O>(args: {
99
- root: {};
100
- path?: Array<string | number>;
101
- }): Pointer<O>;
102
- export default pointer;
103
- /**
104
- * Returns whether `p` is a pointer.
105
- */
106
- export declare const isPointer: (p: $IntentionalAny) => p is Pointer<unknown>;
107
- //# sourceMappingURL=pointer.d.ts.map
1
+ import type { $IntentionalAny } from './types';
2
+ type PathToProp = Array<string | number>;
3
+ export type PointerMeta = {
4
+ root: {};
5
+ path: (string | number)[];
6
+ };
7
+ export type UnindexableTypesForPointer = number | string | boolean | null | void | undefined | Function;
8
+ export type UnindexablePointer = {
9
+ [K in $IntentionalAny]: Pointer<undefined>;
10
+ };
11
+ /**
12
+ * A wrapper type for the type a `Pointer` points to.
13
+ */
14
+ export type PointerType<O> = {
15
+ /**
16
+ * Only accessible via the type system.
17
+ * This is a helper for getting the underlying pointer type
18
+ * via the type space.
19
+ */
20
+ $$__pointer_type: O;
21
+ };
22
+ /**
23
+ * The type of {@link Atom} pointers. See {@link pointer|pointer()} for an
24
+ * explanation of pointers.
25
+ *
26
+ * @see Atom
27
+ *
28
+ * @remarks
29
+ * The Pointer type is quite tricky because it doesn't play well with `any` and other inexact types.
30
+ * Here is an example that one would expect to work, but currently doesn't:
31
+ * ```ts
32
+ * declare function expectAnyPointer(pointer: Pointer<any>): void
33
+ *
34
+ * expectAnyPointer(null as Pointer<{}>) // this shows as a type error because Pointer<{}> is not assignable to Pointer<any>, even though it should
35
+ * ```
36
+ *
37
+ * The current solution is to just avoid using `any` with pointer-related code (or type-test it well).
38
+ * But if you enjoy solving typescript puzzles, consider fixing this :)
39
+ * Potentially, [TypeScript variance annotations in 4.7+](https://devblogs.microsoft.com/typescript/announcing-typescript-4-7-beta/#optional-variance-annotations-for-type-parameters)
40
+ * might be able to help us.
41
+ */
42
+ export type Pointer<O> = PointerType<O> & PointerInner<Exclude<O, undefined>, undefined extends O ? undefined : never>;
43
+ type PointerInner<O, Optional> = O extends UnindexableTypesForPointer ? UnindexablePointer : unknown extends O ? UnindexablePointer : O extends (infer T)[] ? Pointer<T>[] : O extends {} ? {
44
+ [K in keyof O]-?: Pointer<O[K] | Optional>;
45
+ } : UnindexablePointer;
46
+ /**
47
+ * Returns the metadata associated with the pointer. Usually the root object and
48
+ * the path.
49
+ *
50
+ * @param p - The pointer.
51
+ */
52
+ export declare const getPointerMeta: <_>(p: PointerType<_>) => PointerMeta;
53
+ /**
54
+ * Returns the root object and the path of the pointer.
55
+ *
56
+ * @example
57
+ * ```ts
58
+ * const {root, path} = getPointerParts(pointer)
59
+ * ```
60
+ *
61
+ * @param p - The pointer.
62
+ *
63
+ * @returns An object with two properties: `root`-the root object or the pointer, and `path`-the path of the pointer. `path` is an array of the property-chain.
64
+ */
65
+ export declare const getPointerParts: <_>(p: Pointer<_>) => {
66
+ root: {};
67
+ path: PathToProp;
68
+ };
69
+ /**
70
+ * Creates a pointer to a (nested) property of an {@link Atom}.
71
+ *
72
+ * @remarks
73
+ * Pointers are used to make prisms of properties or nested properties of
74
+ * {@link Atom|Atoms}.
75
+ *
76
+ * Pointers also allow easy construction of new pointers pointing to nested members
77
+ * of the root object, by simply using property chaining. E.g. `somePointer.a.b` will
78
+ * create a new pointer that has `'a'` and `'b'` added to the path of `somePointer`.
79
+ *
80
+ * @example
81
+ * ```ts
82
+ * // Here, sum is a prism that updates whenever the a or b prop of someAtom does.
83
+ * const sum = prism(() => {
84
+ * return val(pointer({root: someAtom, path: ['a']})) + val(pointer({root: someAtom, path: ['b']}));
85
+ * });
86
+ *
87
+ * // Note, atoms have a convenience Atom.pointer property that points to the root,
88
+ * // which you would normally use in this situation.
89
+ * const sum = prism(() => {
90
+ * return val(someAtom.pointer.a) + val(someAtom.pointer.b);
91
+ * });
92
+ * ```
93
+ *
94
+ * @param args - The pointer parameters.
95
+ *
96
+ * @typeParam O - The type of the value being pointed to.
97
+ */
98
+ declare function pointer<O>(args: {
99
+ root: {};
100
+ path?: Array<string | number>;
101
+ }): Pointer<O>;
102
+ export default pointer;
103
+ /**
104
+ * Returns whether `p` is a pointer.
105
+ */
106
+ export declare const isPointer: (p: $IntentionalAny) => p is Pointer<unknown>;
107
+ //# sourceMappingURL=pointer.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=pointer.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pointer.test.d.ts","sourceRoot":"","sources":["../src/pointer.test.ts"],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- export {};
2
- //# sourceMappingURL=pointer.typeTest.d.ts.map
1
+ export {};
2
+ //# sourceMappingURL=pointer.typeTest.d.ts.map
@@ -1,20 +1,20 @@
1
- import type { Prism } from './prism/Interface';
2
- import type { Pointer, PointerType } from './pointer';
3
- /**
4
- * Interface for objects that can provide a prism at a certain path.
5
- */
6
- export interface PointerToPrismProvider {
7
- /**
8
- * Returns a prism of the value at the provided pointer.
9
- */
10
- pointerToPrism<P>(pointer: Pointer<P>): Prism<P>;
11
- }
12
- export declare function isPointerToPrismProvider(val: unknown): val is PointerToPrismProvider;
13
- /**
14
- * Returns a prism of the value at the provided pointer. Prisms are
15
- * cached per pointer.
16
- *
17
- * @param pointer - The pointer to return the prism at.
18
- */
19
- export declare const pointerToPrism: <P extends PointerType<any>>(pointer: P) => Prism<P extends PointerType<infer T> ? T : void>;
20
- //# sourceMappingURL=pointerToPrism.d.ts.map
1
+ import type { Prism } from './prism/Interface';
2
+ import type { Pointer, PointerType } from './pointer';
3
+ /**
4
+ * Interface for objects that can provide a prism at a certain path.
5
+ */
6
+ export interface PointerToPrismProvider {
7
+ /**
8
+ * Returns a prism of the value at the provided pointer.
9
+ */
10
+ pointerToPrism<P>(pointer: Pointer<P>): Prism<P>;
11
+ }
12
+ export declare function isPointerToPrismProvider(val: unknown): val is PointerToPrismProvider;
13
+ /**
14
+ * Returns a prism of the value at the provided pointer. Prisms are
15
+ * cached per pointer.
16
+ *
17
+ * @param pointer - The pointer to return the prism at.
18
+ */
19
+ export declare const pointerToPrism: <P extends PointerType<any>>(pointer: P) => Prism<P extends PointerType<infer T> ? T : void>;
20
+ //# sourceMappingURL=pointerToPrism.d.ts.map
@@ -1,33 +1,33 @@
1
- import type Ticker from '../Ticker';
2
- import type { VoidFn } from '../types';
3
- /**
4
- * Common interface for prisms.
5
- */
6
- export interface Prism<V> {
7
- /**
8
- * Whether the object is a prism.
9
- */
10
- isPrism: true;
11
- /**
12
- * Whether the prism is hot.
13
- */
14
- isHot: boolean;
15
- /**
16
- * Calls `listener` with a fresh value every time the prism _has_ a new value, throttled by Ticker.
17
- */
18
- onChange(ticker: Ticker, listener: (v: V) => void, immediate?: boolean): VoidFn;
19
- onStale(cb: () => void): VoidFn;
20
- /**
21
- * Keep the prism hot, even if there are no tappers (subscribers).
22
- */
23
- keepHot(): VoidFn;
24
- /**
25
- * Gets the current value of the prism. If the value is stale, it causes the prism to freshen.
26
- */
27
- getValue(): V;
28
- }
29
- /**
30
- * Returns whether `d` is a prism.
31
- */
32
- export declare function isPrism(d: any): d is Prism<unknown>;
33
- //# sourceMappingURL=Interface.d.ts.map
1
+ import type Ticker from '../Ticker';
2
+ import type { VoidFn } from '../types';
3
+ /**
4
+ * Common interface for prisms.
5
+ */
6
+ export interface Prism<V> {
7
+ /**
8
+ * Whether the object is a prism.
9
+ */
10
+ isPrism: true;
11
+ /**
12
+ * Whether the prism is hot.
13
+ */
14
+ isHot: boolean;
15
+ /**
16
+ * Calls `listener` with a fresh value every time the prism _has_ a new value, throttled by Ticker.
17
+ */
18
+ onChange(ticker: Ticker, listener: (v: V) => void, immediate?: boolean): VoidFn;
19
+ onStale(cb: () => void): VoidFn;
20
+ /**
21
+ * Keep the prism hot, even if there are no tappers (subscribers).
22
+ */
23
+ keepHot(): VoidFn;
24
+ /**
25
+ * Gets the current value of the prism. If the value is stale, it causes the prism to freshen.
26
+ */
27
+ getValue(): V;
28
+ }
29
+ /**
30
+ * Returns whether `d` is a prism.
31
+ */
32
+ export declare function isPrism(d: any): d is Prism<unknown>;
33
+ //# sourceMappingURL=Interface.d.ts.map
@@ -1 +1 @@
1
- //# sourceMappingURL=asyncIterateOver.d.ts.map
1
+ //# sourceMappingURL=asyncIterateOver.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { $IntentionalAny } from '../types';
2
- import type { Prism } from './Interface';
3
- export declare const startIgnoringDependencies: () => void, stopIgnoringDependencies: () => void, reportResolutionEnd: (_d: Prism<$IntentionalAny>) => void, reportResolutionStart: (d: Prism<$IntentionalAny>) => void, pushCollector: (collector: (d: Prism<$IntentionalAny>) => void) => void, popCollector: (collector: (d: Prism<$IntentionalAny>) => void) => void;
4
- //# sourceMappingURL=discoveryMechanism.d.ts.map
1
+ import type { $IntentionalAny } from '../types';
2
+ import type { Prism } from './Interface';
3
+ export declare const startIgnoringDependencies: () => void, stopIgnoringDependencies: () => void, reportResolutionEnd: (_d: Prism<$IntentionalAny>) => void, reportResolutionStart: (d: Prism<$IntentionalAny>) => void, pushCollector: (collector: (d: Prism<$IntentionalAny>) => void) => void, popCollector: (collector: (d: Prism<$IntentionalAny>) => void) => void;
4
+ //# sourceMappingURL=discoveryMechanism.d.ts.map
@@ -1,7 +1,7 @@
1
- import type { Pointer } from '../pointer';
2
- import type { Prism } from './Interface';
3
- export default function iterateAndCountTicks<V>(pointerOrPrism: Prism<V> | Pointer<V>): Generator<{
4
- value: V;
5
- ticks: number;
6
- }, void, void>;
7
- //# sourceMappingURL=iterateAndCountTicks.d.ts.map
1
+ import type { Pointer } from '../pointer';
2
+ import type { Prism } from './Interface';
3
+ export default function iterateAndCountTicks<V>(pointerOrPrism: Prism<V> | Pointer<V>): Generator<{
4
+ value: V;
5
+ ticks: number;
6
+ }, void, void>;
7
+ //# sourceMappingURL=iterateAndCountTicks.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { Pointer } from '../pointer';
2
- import type { Prism } from './Interface';
3
- export default function iterateOver<V>(pointerOrPrism: Prism<V> | Pointer<V>): Generator<V, void, void>;
4
- //# sourceMappingURL=iterateOver.d.ts.map
1
+ import type { Pointer } from '../pointer';
2
+ import type { Prism } from './Interface';
3
+ export default function iterateOver<V>(pointerOrPrism: Prism<V> | Pointer<V>): Generator<V, void, void>;
4
+ //# sourceMappingURL=iterateOver.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=iterateOver.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iterateOver.test.d.ts","sourceRoot":"","sources":["../../src/prism/iterateOver.test.ts"],"names":[],"mappings":""}
@@ -90,7 +90,7 @@ declare function state<T>(key: string, initialValue: T): [T, (val: T) => void];
90
90
  *
91
91
  * @example
92
92
  * ```ts
93
- * import {prism} from '@tomorrowevening/theatre-dataverse'
93
+ * import {prism} from '@theatre/dataverse'
94
94
  *
95
95
  * function onlyUsefulInAPrism() {
96
96
  * prism.ensurePrism()
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=prism.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prism.test.d.ts","sourceRoot":"","sources":["../../src/prism/prism.test.ts"],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- export {};
2
- //# sourceMappingURL=setupTestEnv.d.ts.map
1
+ export {};
2
+ //# sourceMappingURL=setupTestEnv.d.ts.map
package/dist/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- /** For `any`s that aren't meant to stay `any`*/
2
- export type $FixMe = any;
3
- /** For `any`s that we don't care about */
4
- export type $IntentionalAny = any;
5
- export type VoidFn = () => void;
6
- //# sourceMappingURL=types.d.ts.map
1
+ /** For `any`s that aren't meant to stay `any`*/
2
+ export type $FixMe = any;
3
+ /** For `any`s that we don't care about */
4
+ export type $IntentionalAny = any;
5
+ export type VoidFn = () => void;
6
+ //# sourceMappingURL=types.d.ts.map
@@ -1,16 +1,16 @@
1
- interface Node<Data> {
2
- next: undefined | Node<Data>;
3
- data: Data;
4
- }
5
- /**
6
- * Just a simple LinkedList
7
- */
8
- export default class Stack<Data> {
9
- _head: undefined | Node<Data>;
10
- constructor();
11
- peek(): Data | undefined;
12
- pop(): Data | undefined;
13
- push(data: Data): void;
14
- }
15
- export {};
16
- //# sourceMappingURL=Stack.d.ts.map
1
+ interface Node<Data> {
2
+ next: undefined | Node<Data>;
3
+ data: Data;
4
+ }
5
+ /**
6
+ * Just a simple LinkedList
7
+ */
8
+ export default class Stack<Data> {
9
+ _head: undefined | Node<Data>;
10
+ constructor();
11
+ peek(): Data | undefined;
12
+ pop(): Data | undefined;
13
+ push(data: Data): void;
14
+ }
15
+ export {};
16
+ //# sourceMappingURL=Stack.d.ts.map
@@ -1,11 +1,11 @@
1
- import type { $IntentionalAny } from '../types';
2
- /**
3
- * Useful in type tests, such as: const a: SomeType = _any
4
- */
5
- export declare const _any: $IntentionalAny;
6
- /**
7
- * Useful in typeTests. If you want to ensure that value v follows type V,
8
- * just write `expectType<V>(v)`
9
- */
10
- export declare const expectType: <T extends unknown>(v: T) => T;
11
- //# sourceMappingURL=typeTestUtils.d.ts.map
1
+ import type { $IntentionalAny } from '../types';
2
+ /**
3
+ * Useful in type tests, such as: const a: SomeType = _any
4
+ */
5
+ export declare const _any: $IntentionalAny;
6
+ /**
7
+ * Useful in typeTests. If you want to ensure that value v follows type V,
8
+ * just write `expectType<V>(v)`
9
+ */
10
+ export declare const expectType: <T extends unknown>(v: T) => T;
11
+ //# sourceMappingURL=typeTestUtils.d.ts.map
@@ -1,3 +1,3 @@
1
- import type { $IntentionalAny } from '../types';
2
- export default function updateDeep<S>(state: S, path: (string | number | undefined)[], reducer: (...args: $IntentionalAny[]) => $IntentionalAny): S;
3
- //# sourceMappingURL=updateDeep.d.ts.map
1
+ import type { $IntentionalAny } from '../types';
2
+ export default function updateDeep<S>(state: S, path: (string | number | undefined)[], reducer: (...args: $IntentionalAny[]) => $IntentionalAny): S;
3
+ //# sourceMappingURL=updateDeep.d.ts.map
package/dist/val.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- import type { Prism } from './prism/Interface';
2
- import type { PointerType } from './pointer';
3
- /**
4
- * Convenience function that returns a plain value from its argument, whether it
5
- * is a pointer, a prism or a plain value itself.
6
- *
7
- * @remarks
8
- * For pointers, the value is returned by first creating a prism, so it is
9
- * reactive e.g. when used in a `prism`.
10
- *
11
- * @param input - The argument to return a value from.
12
- */
13
- export declare const val: <P extends PointerType<any> | Prism<any> | null | undefined>(input: P) => P extends PointerType<infer T> ? T : P extends Prism<infer T_1> ? T_1 : P extends null | undefined ? P : unknown;
14
- //# sourceMappingURL=val.d.ts.map
1
+ import type { Prism } from './prism/Interface';
2
+ import type { PointerType } from './pointer';
3
+ /**
4
+ * Convenience function that returns a plain value from its argument, whether it
5
+ * is a pointer, a prism or a plain value itself.
6
+ *
7
+ * @remarks
8
+ * For pointers, the value is returned by first creating a prism, so it is
9
+ * reactive e.g. when used in a `prism`.
10
+ *
11
+ * @param input - The argument to return a value from.
12
+ */
13
+ export declare const val: <P extends Prism<any> | PointerType<any> | null | undefined>(input: P) => P extends PointerType<infer T> ? T : P extends Prism<infer T_1> ? T_1 : P extends null | undefined ? P : unknown;
14
+ //# sourceMappingURL=val.d.ts.map
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@tomorrowevening/theatre-dataverse",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "license": "Apache-2.0",
5
5
  "author": {
6
- "name": "Colin Duffy",
7
- "email": "colin@tomorrowevening.com",
8
- "url": "https://tomorrowevening.com/"
6
+ "name": "Aria Minaei",
7
+ "email": "aria@theatrejs.com",
8
+ "url": "https://github.com/AriaMinaei"
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/tomorrowevening/theatre",
12
+ "url": "https://github.com/AriaMinaei/theatre",
13
13
  "directory": "packages/dataverse"
14
14
  },
15
15
  "main": "dist/index.js",
@@ -17,15 +17,12 @@
17
17
  "files": [
18
18
  "dist/**/*"
19
19
  ],
20
- "publishConfig": {
21
- "access": "public"
22
- },
23
20
  "scripts": {
24
21
  "prepack": "node ../../devEnv/ensurePublishing.js",
25
22
  "typecheck": "yarn run build:ts",
26
23
  "build": "run-s build:ts build:js build:api-json",
27
24
  "build:ts": "tsc --build ./tsconfig.json",
28
- "build:js": "tsx ./devEnv/build.ts",
25
+ "build:js": "node -r esbuild-register ./devEnv/build.ts",
29
26
  "build:api-json": "api-extractor run --local --config devEnv/api-extractor.json",
30
27
  "prepublish": "node ../../devEnv/ensurePublishing.js",
31
28
  "clean": "rm -rf ./dist && rm -f tsconfig.tsbuildinfo",
@@ -38,8 +35,8 @@
38
35
  "@types/lodash-es": "^4.17.4",
39
36
  "@types/node": "^15.6.2",
40
37
  "esbuild": "^0.12.15",
38
+ "esbuild-register": "^2.5.0",
41
39
  "npm-run-all": "^4.1.5",
42
- "tsx": "4.7.0",
43
40
  "typedoc": "^0.24.8",
44
41
  "typedoc-plugin-markdown": "^3.15.4",
45
42
  "typescript": "5.1.6"