@omegup/msync 0.1.69 → 0.1.70
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/index.esm.js +9 -1
- package/index.esm.js.map +1 -1
- package/index.js +11 -0
- package/index.js.map +1 -1
- package/lib/expression/array.d.ts +2 -1
- package/lib/expression/concat.d.ts +3 -1
- package/package.json +1 -1
|
@@ -21,10 +21,11 @@ export declare const $setUnion: <T, D, C>(...exprs: Expr<Arr<T>, D, C>[]) => Exp
|
|
|
21
21
|
export declare const first: <T, D, C>(expr: Expr<Arr<T>, D, C>) => Expr<T | null, D, C>;
|
|
22
22
|
export declare const firstSure: <T, D, C>(expr: Expr<Arr<T>, D, C>) => Expr<T, D, C>;
|
|
23
23
|
export declare const last: <T, D, C>(expr: Expr<Arr<T>, D, C>) => Expr<T | null, D, C>;
|
|
24
|
+
export declare const $arrayElemAt: <T, D, C>(expr: Expr<Arr<T>, D, C>, idx: Expr<number, D, C>) => Expr<T | null, D, C>;
|
|
24
25
|
export type NullToOBJ<N extends null> = N extends null ? O : N;
|
|
25
26
|
export declare const mergeObjects: <T1, T2, D, C = unknown, N extends null = never>(...exprs: readonly [Expr<T1 | N, D, C>, ...[...Expr<T1 | T2 | N, D, C>[], Expr<T2, D, C>]]) => Expr<(T1 | NullToOBJ<N>) & T2, D, C>;
|
|
26
27
|
export declare const $objectToArray: <T extends O, D, C>(expr: Expr<T, D, C>) => Expr<Arr<KVEntry<T>>, D, C>;
|
|
27
|
-
export declare const $arrayToObject: <T
|
|
28
|
+
export declare const $arrayToObject: <T, D, C>(expr: Expr<Arr<KVEntry<T>>, D, C>) => Expr<O<Partial<T>>, D, C>;
|
|
28
29
|
export declare const anyElementTrue: <D, C = unknown>(expr: Expr<Arr<boolean>, D, C>) => Expr<boolean, D, C>;
|
|
29
30
|
type Reduce<T, V> = RORec<'value', V> & RORec<'this', T>;
|
|
30
31
|
export declare const $reduce: <T, V, D, C>(input: Expr<Arr<T>, D, C>, initialValue: Expr<V, D, C>, inExpr: Expr<V, D, C & Reduce<T, V>>) => Expr<V, D, C>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { App, HKT, I, IdHKT, N, O, Omit, RORec, StrKey } from '../../types';
|
|
1
|
+
import type { App, Arr, HKT, I, IdHKT, N, O, Omit, RORec, StrKey } from '../../types';
|
|
2
2
|
import type { Expr } from '../types';
|
|
3
3
|
import { type Exact, type ExactPart, type MapO, type MergeHKT } from '../utils/map-object';
|
|
4
4
|
export declare const concat: {
|
|
@@ -6,6 +6,8 @@ export declare const concat: {
|
|
|
6
6
|
<D, C>(...expr: Expr<string | N, D, C>[]): Expr<string | null, D, C>;
|
|
7
7
|
};
|
|
8
8
|
export declare const $substr: <D, C>(expr: Expr<string, D, C>, start: Expr<number, D, C>, length: Expr<number, D, C>) => Expr<string, D, C>;
|
|
9
|
+
export declare const $indexOfCP: <D, C>(expr: Expr<string, D, C>, substring: Expr<string, D, C>, start?: Expr<number, D, C>, end?: Expr<number, D, C>) => Expr<number, D, C>;
|
|
10
|
+
export declare const $split: <D, C>(expr: Expr<string, D, C>, delimiter: Expr<string, D, C>) => Expr<Arr<string>, D, C>;
|
|
9
11
|
export declare const padLeft: <D, C>(expr: Expr<string, D, C>, pad: string) => Expr<string, D, C>;
|
|
10
12
|
export declare const regex: <D, C>(expr: Expr<string, D, C>, regex: Expr<string, D, C>, options?: Expr<string, D, C>) => Expr<boolean, D, C>;
|
|
11
13
|
export declare const str: <D, C>(expr: Expr<unknown, D, C>) => Expr<string, D, C>;
|