clientnode 3.0.1000 → 3.0.1001
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.d.ts +2 -2
- package/package.json +1 -1
- package/type.d.ts +8 -6
package/index.d.ts
CHANGED
|
@@ -1234,7 +1234,7 @@ export declare class Tools<TElement = HTMLElement> {
|
|
|
1234
1234
|
* @returns Object of prepared scope name mappings and compiled function or
|
|
1235
1235
|
* error string message if given expression couldn't be compiled.
|
|
1236
1236
|
*/
|
|
1237
|
-
static stringCompile<T = string>(this: void, expression: string, scope?:
|
|
1237
|
+
static stringCompile<T = string, N extends Array<string> = Array<string>>(this: void, expression: string, scope?: N | Mapping<unknown, N[number]> | N[number], execute?: boolean): CompilationResult<T, N>;
|
|
1238
1238
|
/**
|
|
1239
1239
|
* Evaluates a given string as expression against given scope.
|
|
1240
1240
|
* @param expression - The string to interpret.
|
|
@@ -1244,7 +1244,7 @@ export declare class Tools<TElement = HTMLElement> {
|
|
|
1244
1244
|
*
|
|
1245
1245
|
* @returns Object with error message during parsing / running or result.
|
|
1246
1246
|
*/
|
|
1247
|
-
static stringEvaluate<T = string>(this: void, expression: string, scope?:
|
|
1247
|
+
static stringEvaluate<T = string, S extends Mapping<unknown> = Mapping<unknown>>(this: void, expression: string, scope?: S, execute?: boolean, binding?: unknown): EvaluationResult<T>;
|
|
1248
1248
|
/**
|
|
1249
1249
|
* Finds the string match of given query in given target text by applying
|
|
1250
1250
|
* given normalisation function to target and query.
|
package/package.json
CHANGED
package/type.d.ts
CHANGED
|
@@ -104,8 +104,8 @@ export interface TimeoutPromise extends Promise<boolean> {
|
|
|
104
104
|
clear: () => void;
|
|
105
105
|
timeoutID: NodeJS.Timeout;
|
|
106
106
|
}
|
|
107
|
-
export type Mapping<
|
|
108
|
-
[key
|
|
107
|
+
export type Mapping<V = string, K extends string = string> = {
|
|
108
|
+
[key in K]: V;
|
|
109
109
|
};
|
|
110
110
|
export type ObjectMask = boolean | {
|
|
111
111
|
[key: string]: boolean | ObjectMask;
|
|
@@ -158,12 +158,14 @@ export type ProcessCloseCallback = (reason: ProcessCloseReason) => void;
|
|
|
158
158
|
export type ProcessErrorCallback = (reason: ProcessError) => void;
|
|
159
159
|
export type RelativePosition = 'above' | 'below' | 'in' | 'left' | 'right';
|
|
160
160
|
export type TemplateFunction<Type = string> = (...parameters: Array<unknown>) => Type;
|
|
161
|
-
export interface CompilationResult<
|
|
161
|
+
export interface CompilationResult<T = string, N extends Array<string> = Array<string>> {
|
|
162
162
|
error: null | string;
|
|
163
|
-
originalScopeNames:
|
|
164
|
-
scopeNameMapping:
|
|
163
|
+
originalScopeNames: N;
|
|
164
|
+
scopeNameMapping: {
|
|
165
|
+
[key in N[number]]: string;
|
|
166
|
+
};
|
|
165
167
|
scopeNames: Array<string>;
|
|
166
|
-
templateFunction: TemplateFunction<
|
|
168
|
+
templateFunction: TemplateFunction<T>;
|
|
167
169
|
}
|
|
168
170
|
export interface EvaluationResult<Type = string> {
|
|
169
171
|
compileError: null | string;
|