@angular-wave/angular.ts 0.0.49 → 0.0.50
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/dist/angular-ts.esm.js +2 -2
- package/dist/angular-ts.umd.js +2 -2
- package/package.json +1 -1
- package/src/core/interpolate/interpolate.js +1 -18
- package/src/core/parser/ast.js +232 -71
- package/src/core/parser/interpreter.js +246 -50
- package/src/core/parser/lexer.js +9 -10
- package/src/core/parser/parse.js +29 -229
- package/src/core/parser/parse.md +0 -13
- package/src/core/parser/parser.js +28 -8
- package/src/core/parser/shared.js +7 -1
- package/src/directive/csp.md +0 -26
- package/src/shared/jqlite/jqlite.js +2 -2
- package/src/types.js +4 -1
- package/types/core/parser/ast.d.ts +267 -73
- package/types/core/parser/interpreter.d.ts +202 -53
- package/types/core/parser/lexer.d.ts +17 -17
- package/types/core/parser/parse.d.ts +23 -23
- package/types/core/parser/parser.d.ts +39 -16
- package/types/core/parser/shared.d.ts +7 -1
- package/types/shared/jqlite/jqlite.d.ts +4 -4
- package/types/types.d.ts +1 -1
- package/src/core/parser/compiler.js +0 -561
- package/types/core/parser/compiler.d.ts +0 -49
|
@@ -1,80 +1,39 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
3
|
-
* @
|
|
2
|
+
* @typedef {Object} ASTNode
|
|
3
|
+
* @property {string} type - The type of the AST node.
|
|
4
|
+
* @property {string} [name] - The name of the identifier.
|
|
5
|
+
* @property {string} [kind] - The kind of the property (e.g., 'init').
|
|
6
|
+
* @property {*} [value] - The value of the node if it is a literal.
|
|
7
|
+
* @property {ASTNode[]} [elements] - The elements of an array node.
|
|
8
|
+
* @property {ASTNode[]} [properties] - The properties of an object node.
|
|
9
|
+
* @property {ASTNode} [key] - The key of an object property.
|
|
10
|
+
* @property {ASTNode} [value] - The value of an object property.
|
|
11
|
+
* @property {ASTNode} [left] - The left-hand side of a binary expression.
|
|
12
|
+
* @property {ASTNode} [right] - The right-hand side of a binary expression.
|
|
13
|
+
* @property {ASTNode} [argument] - The argument of a unary expression.
|
|
14
|
+
* @property {ASTNode} [test] - The test expression of a conditional expression.
|
|
15
|
+
* @property {ASTNode} [alternate] - The alternate expression of a conditional expression.
|
|
16
|
+
* @property {ASTNode} [consequent] - The consequent expression of a conditional expression.
|
|
17
|
+
* @property {ASTNode[]} [body] - The body of a program or block statement.
|
|
18
|
+
* @property {ASTNode} [expression] - The expression of an expression statement.
|
|
19
|
+
* @property {ASTNode} [callee] - The callee of a call expression.
|
|
20
|
+
* @property {ASTNode[]} [arguments] - The arguments of a call expression.
|
|
21
|
+
* @property {boolean} [prefix] - Indicates if a unary operator is a prefix.
|
|
22
|
+
* @property {ASTNode} [object] - The object of a member expression.
|
|
23
|
+
* @property {ASTNode} [property] - The property of a member expression.
|
|
24
|
+
* @property {boolean} [computed] - Indicates if a member expression is computed.
|
|
25
|
+
* @property {string} [operator] - The operator of a binary or logical expression.
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* @param {import('./lexer').Lexer} lexer - The lexer instance for tokenizing input
|
|
29
|
+
* @param {import("./parser").ParserOptions} options
|
|
4
30
|
*/
|
|
5
|
-
export function AST(lexer: import("./lexer").Lexer, options: any): void;
|
|
6
31
|
export class AST {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* @param {*} options
|
|
10
|
-
*/
|
|
11
|
-
constructor(lexer: import("./lexer").Lexer, options: any);
|
|
32
|
+
constructor(lexer: any, options: any);
|
|
33
|
+
/** @type {import('./lexer').Lexer} */
|
|
12
34
|
lexer: import("./lexer").Lexer;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
type: string;
|
|
16
|
-
body: {
|
|
17
|
-
type: string;
|
|
18
|
-
expression: any;
|
|
19
|
-
}[];
|
|
20
|
-
};
|
|
21
|
-
text: any;
|
|
22
|
-
tokens: import("./lexer").Token[];
|
|
23
|
-
program(): {
|
|
24
|
-
type: string;
|
|
25
|
-
body: {
|
|
26
|
-
type: string;
|
|
27
|
-
expression: any;
|
|
28
|
-
}[];
|
|
29
|
-
};
|
|
30
|
-
expressionStatement(): {
|
|
31
|
-
type: string;
|
|
32
|
-
expression: any;
|
|
33
|
-
};
|
|
34
|
-
filterChain(): any;
|
|
35
|
-
expression(): any;
|
|
36
|
-
assignment(): any;
|
|
37
|
-
ternary(): any;
|
|
38
|
-
logicalOR(): any;
|
|
39
|
-
logicalAND(): any;
|
|
40
|
-
equality(): any;
|
|
41
|
-
relational(): any;
|
|
42
|
-
additive(): any;
|
|
43
|
-
multiplicative(): any;
|
|
44
|
-
unary(): any;
|
|
45
|
-
primary(): any;
|
|
46
|
-
filter(baseExpression: any): {
|
|
47
|
-
type: string;
|
|
48
|
-
callee: {
|
|
49
|
-
type: string;
|
|
50
|
-
name: any;
|
|
51
|
-
};
|
|
52
|
-
arguments: any[];
|
|
53
|
-
filter: boolean;
|
|
54
|
-
};
|
|
55
|
-
parseArguments(): any;
|
|
56
|
-
identifier(): {
|
|
57
|
-
type: string;
|
|
58
|
-
name: any;
|
|
59
|
-
};
|
|
60
|
-
constant(): {
|
|
61
|
-
type: string;
|
|
62
|
-
value: any;
|
|
63
|
-
};
|
|
64
|
-
arrayDeclaration(): any;
|
|
65
|
-
object(): {
|
|
66
|
-
type: string;
|
|
67
|
-
properties: {
|
|
68
|
-
type: string;
|
|
69
|
-
kind: string;
|
|
70
|
-
}[];
|
|
71
|
-
};
|
|
72
|
-
throwError(msg: any, token: any): never;
|
|
73
|
-
consume(e1: any): false | import("./lexer").Token;
|
|
74
|
-
peekToken(): import("./lexer").Token;
|
|
75
|
-
peek(e1: any, e2: any, e3: any, e4: any): false | import("./lexer").Token;
|
|
76
|
-
peekAhead(i: any, e1: any, e2: any, e3: any, e4: any): false | import("./lexer").Token;
|
|
77
|
-
expect(e1: any, e2: any, e3: any, e4: any): false | import("./lexer").Token;
|
|
35
|
+
/** @type {import("./parser").ParserOptions} */
|
|
36
|
+
options: import("./parser").ParserOptions;
|
|
78
37
|
selfReferential: {
|
|
79
38
|
this: {
|
|
80
39
|
type: string;
|
|
@@ -83,4 +42,239 @@ export class AST {
|
|
|
83
42
|
type: string;
|
|
84
43
|
};
|
|
85
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* Parses the input text and generates an AST.
|
|
47
|
+
* @param {string} text - The input text to parse.
|
|
48
|
+
* @returns {ASTNode} The root node of the AST.
|
|
49
|
+
*/
|
|
50
|
+
ast(text: string): ASTNode;
|
|
51
|
+
text: string;
|
|
52
|
+
tokens: import("./lexer").Token[];
|
|
53
|
+
/**
|
|
54
|
+
* Parses a program.
|
|
55
|
+
* @returns {ASTNode} The program node.
|
|
56
|
+
*/
|
|
57
|
+
program(): ASTNode;
|
|
58
|
+
/**
|
|
59
|
+
* Parses an expression statement.
|
|
60
|
+
* @returns {ASTNode} The expression statement node.
|
|
61
|
+
*/
|
|
62
|
+
expressionStatement(): ASTNode;
|
|
63
|
+
/**
|
|
64
|
+
* Parses a filter chain.
|
|
65
|
+
* @returns {ASTNode} The filter chain node.
|
|
66
|
+
*/
|
|
67
|
+
filterChain(): ASTNode;
|
|
68
|
+
/**
|
|
69
|
+
* Parses an expression.
|
|
70
|
+
* @returns {ASTNode} The expression node.
|
|
71
|
+
*/
|
|
72
|
+
expression(): ASTNode;
|
|
73
|
+
/**
|
|
74
|
+
* Parses an assignment expression.
|
|
75
|
+
* @returns {ASTNode} The assignment expression node.
|
|
76
|
+
*/
|
|
77
|
+
assignment(): ASTNode;
|
|
78
|
+
/**
|
|
79
|
+
* Parses a ternary expression.
|
|
80
|
+
* @returns {ASTNode} The ternary expression node.
|
|
81
|
+
*/
|
|
82
|
+
ternary(): ASTNode;
|
|
83
|
+
/**
|
|
84
|
+
* Parses a logical OR expression.
|
|
85
|
+
* @returns {ASTNode} The logical OR expression node.
|
|
86
|
+
*/
|
|
87
|
+
logicalOR(): ASTNode;
|
|
88
|
+
/**
|
|
89
|
+
* Parses a logical AND expression.
|
|
90
|
+
* @returns {ASTNode} The logical AND expression node.
|
|
91
|
+
*/
|
|
92
|
+
logicalAND(): ASTNode;
|
|
93
|
+
/**
|
|
94
|
+
* Parses an equality expression.
|
|
95
|
+
* @returns {ASTNode} The equality expression node.
|
|
96
|
+
*/
|
|
97
|
+
equality(): ASTNode;
|
|
98
|
+
/**
|
|
99
|
+
* Parses a relational expression.
|
|
100
|
+
* @returns {ASTNode} The relational expression node.
|
|
101
|
+
*/
|
|
102
|
+
relational(): ASTNode;
|
|
103
|
+
/**
|
|
104
|
+
* Parses an additive expression.
|
|
105
|
+
* @returns {ASTNode} The additive expression node.
|
|
106
|
+
*/
|
|
107
|
+
additive(): ASTNode;
|
|
108
|
+
/**
|
|
109
|
+
* Parses a multiplicative expression.
|
|
110
|
+
* @returns {ASTNode} The multiplicative expression node.
|
|
111
|
+
*/
|
|
112
|
+
multiplicative(): ASTNode;
|
|
113
|
+
/**
|
|
114
|
+
* Parses a unary expression.
|
|
115
|
+
* @returns {ASTNode} The unary expression node.
|
|
116
|
+
*/
|
|
117
|
+
unary(): ASTNode;
|
|
118
|
+
/**
|
|
119
|
+
* Parses a primary expression.
|
|
120
|
+
* @returns {ASTNode} The primary expression node.
|
|
121
|
+
*/
|
|
122
|
+
primary(): ASTNode;
|
|
123
|
+
/**
|
|
124
|
+
* Parses a filter.
|
|
125
|
+
* @param {ASTNode} baseExpression - The base expression to apply the filter to.
|
|
126
|
+
* @returns {ASTNode} The filter node.
|
|
127
|
+
*/
|
|
128
|
+
filter(baseExpression: ASTNode): ASTNode;
|
|
129
|
+
/**
|
|
130
|
+
* Parses function arguments.
|
|
131
|
+
* @returns {ASTNode[]} The arguments array.
|
|
132
|
+
*/
|
|
133
|
+
parseArguments(): ASTNode[];
|
|
134
|
+
/**
|
|
135
|
+
* Parses an identifier.
|
|
136
|
+
* @returns {ASTNode} The identifier node.
|
|
137
|
+
*/
|
|
138
|
+
identifier(): ASTNode;
|
|
139
|
+
/**
|
|
140
|
+
* Parses a constant.
|
|
141
|
+
* @returns {ASTNode} The constant node.
|
|
142
|
+
*/
|
|
143
|
+
constant(): ASTNode;
|
|
144
|
+
/**
|
|
145
|
+
* Parses an array declaration.
|
|
146
|
+
* @returns {ASTNode} The array declaration node.
|
|
147
|
+
*/
|
|
148
|
+
arrayDeclaration(): ASTNode;
|
|
149
|
+
/**
|
|
150
|
+
* Parses an object.
|
|
151
|
+
* @returns {ASTNode} The object node.
|
|
152
|
+
*/
|
|
153
|
+
object(): ASTNode;
|
|
154
|
+
/**
|
|
155
|
+
* Throws a syntax error.
|
|
156
|
+
* @param {string} msg - The error message.
|
|
157
|
+
* @param {import("./lexer").Token} [token] - The token that caused the error.
|
|
158
|
+
*/
|
|
159
|
+
throwError(msg: string, token?: import("./lexer").Token): void;
|
|
160
|
+
/**
|
|
161
|
+
* Consumes a token if it matches the expected type.
|
|
162
|
+
* @param {string} [e1] - The expected token type.
|
|
163
|
+
* @returns {import("./lexer").Token} The consumed token.
|
|
164
|
+
*/
|
|
165
|
+
consume(e1?: string): import("./lexer").Token;
|
|
166
|
+
/**
|
|
167
|
+
* Returns the next token without consuming it.
|
|
168
|
+
* @returns {import("./lexer").Token} The next token.
|
|
169
|
+
*/
|
|
170
|
+
peekToken(): import("./lexer").Token;
|
|
171
|
+
/**
|
|
172
|
+
* Checks if the next token matches any of the expected types.
|
|
173
|
+
* @param {...string} [expected] - The expected token types.
|
|
174
|
+
* @returns {import('./lexer').Token|boolean} The next token if it matches, otherwise false.
|
|
175
|
+
*/
|
|
176
|
+
peek(...expected?: string[]): import("./lexer").Token | boolean;
|
|
177
|
+
/**
|
|
178
|
+
* Checks if the token at the specified index matches any of the expected types.
|
|
179
|
+
* @param {number} i - The index to check.
|
|
180
|
+
* @param {...string} [expected] - The expected token types.
|
|
181
|
+
* @returns {import("./lexer").Token|boolean} The token at the specified index if it matches, otherwise false.
|
|
182
|
+
*/
|
|
183
|
+
peekAhead(i: number, ...expected?: string[]): import("./lexer").Token | boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Consumes the next token if it matches any of the expected types.
|
|
186
|
+
* @param {...string} [expected] - The expected token types.
|
|
187
|
+
* @returns {import("./lexer").Token|boolean} The consumed token if it matches, otherwise false.
|
|
188
|
+
*/
|
|
189
|
+
expect(...expected?: string[]): import("./lexer").Token | boolean;
|
|
86
190
|
}
|
|
191
|
+
export type ASTNode = {
|
|
192
|
+
/**
|
|
193
|
+
* - The type of the AST node.
|
|
194
|
+
*/
|
|
195
|
+
type: string;
|
|
196
|
+
/**
|
|
197
|
+
* - The name of the identifier.
|
|
198
|
+
*/
|
|
199
|
+
name?: string;
|
|
200
|
+
/**
|
|
201
|
+
* - The kind of the property (e.g., 'init').
|
|
202
|
+
*/
|
|
203
|
+
kind?: string;
|
|
204
|
+
/**
|
|
205
|
+
* - The value of the node if it is a literal.
|
|
206
|
+
*/
|
|
207
|
+
value?: any;
|
|
208
|
+
/**
|
|
209
|
+
* - The elements of an array node.
|
|
210
|
+
*/
|
|
211
|
+
elements?: ASTNode[];
|
|
212
|
+
/**
|
|
213
|
+
* - The properties of an object node.
|
|
214
|
+
*/
|
|
215
|
+
properties?: ASTNode[];
|
|
216
|
+
/**
|
|
217
|
+
* - The key of an object property.
|
|
218
|
+
*/
|
|
219
|
+
key?: ASTNode;
|
|
220
|
+
/**
|
|
221
|
+
* - The left-hand side of a binary expression.
|
|
222
|
+
*/
|
|
223
|
+
left?: ASTNode;
|
|
224
|
+
/**
|
|
225
|
+
* - The right-hand side of a binary expression.
|
|
226
|
+
*/
|
|
227
|
+
right?: ASTNode;
|
|
228
|
+
/**
|
|
229
|
+
* - The argument of a unary expression.
|
|
230
|
+
*/
|
|
231
|
+
argument?: ASTNode;
|
|
232
|
+
/**
|
|
233
|
+
* - The test expression of a conditional expression.
|
|
234
|
+
*/
|
|
235
|
+
test?: ASTNode;
|
|
236
|
+
/**
|
|
237
|
+
* - The alternate expression of a conditional expression.
|
|
238
|
+
*/
|
|
239
|
+
alternate?: ASTNode;
|
|
240
|
+
/**
|
|
241
|
+
* - The consequent expression of a conditional expression.
|
|
242
|
+
*/
|
|
243
|
+
consequent?: ASTNode;
|
|
244
|
+
/**
|
|
245
|
+
* - The body of a program or block statement.
|
|
246
|
+
*/
|
|
247
|
+
body?: ASTNode[];
|
|
248
|
+
/**
|
|
249
|
+
* - The expression of an expression statement.
|
|
250
|
+
*/
|
|
251
|
+
expression?: ASTNode;
|
|
252
|
+
/**
|
|
253
|
+
* - The callee of a call expression.
|
|
254
|
+
*/
|
|
255
|
+
callee?: ASTNode;
|
|
256
|
+
/**
|
|
257
|
+
* - The arguments of a call expression.
|
|
258
|
+
*/
|
|
259
|
+
arguments?: ASTNode[];
|
|
260
|
+
/**
|
|
261
|
+
* - Indicates if a unary operator is a prefix.
|
|
262
|
+
*/
|
|
263
|
+
prefix?: boolean;
|
|
264
|
+
/**
|
|
265
|
+
* - The object of a member expression.
|
|
266
|
+
*/
|
|
267
|
+
object?: ASTNode;
|
|
268
|
+
/**
|
|
269
|
+
* - The property of a member expression.
|
|
270
|
+
*/
|
|
271
|
+
property?: ASTNode;
|
|
272
|
+
/**
|
|
273
|
+
* - Indicates if a member expression is computed.
|
|
274
|
+
*/
|
|
275
|
+
computed?: boolean;
|
|
276
|
+
/**
|
|
277
|
+
* - The operator of a binary or logical expression.
|
|
278
|
+
*/
|
|
279
|
+
operator?: string;
|
|
280
|
+
};
|
|
@@ -1,57 +1,206 @@
|
|
|
1
|
-
export function ASTInterpreter($filter: any): void;
|
|
2
1
|
export class ASTInterpreter {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @param {function(any):any} $filter
|
|
4
|
+
*/
|
|
5
|
+
constructor($filter: (arg0: any) => any);
|
|
6
|
+
$filter: (arg0: any) => any;
|
|
7
|
+
/**
|
|
8
|
+
* Compiles the AST into a function.
|
|
9
|
+
* @param {import("./ast").ASTNode} ast - The AST to compile.
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
compile(ast: import("./ast").ASTNode): any;
|
|
13
|
+
/**
|
|
14
|
+
* Recurses the AST nodes.
|
|
15
|
+
* @param {import("./ast").ASTNode} ast - The AST node.
|
|
16
|
+
* @param {Object} [context] - The context.
|
|
17
|
+
* @param {boolean|number} [create] - The create flag.
|
|
18
|
+
* @returns {function} The recursive function.
|
|
19
|
+
*/
|
|
20
|
+
recurse(ast: import("./ast").ASTNode, context?: any, create?: boolean | number): Function;
|
|
21
|
+
/**
|
|
22
|
+
* Unary plus operation.
|
|
23
|
+
* @param {function} argument - The argument function.
|
|
24
|
+
* @param {Object} [context] - The context.
|
|
25
|
+
* @returns {function} The unary plus function.
|
|
26
|
+
*/
|
|
27
|
+
"unary+"(argument: Function, context?: any): Function;
|
|
28
|
+
/**
|
|
29
|
+
* Unary minus operation.
|
|
30
|
+
* @param {function} argument - The argument function.
|
|
31
|
+
* @param {Object} [context] - The context.
|
|
32
|
+
* @returns {function} The unary minus function.
|
|
33
|
+
*/
|
|
34
|
+
"unary-"(argument: Function, context?: any): Function;
|
|
35
|
+
/**
|
|
36
|
+
* Unary negation operation.
|
|
37
|
+
* @param {function} argument - The argument function.
|
|
38
|
+
* @param {Object} [context] - The context.
|
|
39
|
+
* @returns {function} The unary negation function.
|
|
40
|
+
*/
|
|
41
|
+
"unary!"(argument: Function, context?: any): Function;
|
|
42
|
+
/**
|
|
43
|
+
* Binary plus operation.
|
|
44
|
+
* @param {function} left - The left operand function.
|
|
45
|
+
* @param {function} right - The right operand function.
|
|
46
|
+
* @param {Object} [context] - The context.
|
|
47
|
+
* @returns {function} The binary plus function.
|
|
48
|
+
*/
|
|
49
|
+
"binary+"(left: Function, right: Function, context?: any): Function;
|
|
50
|
+
/**
|
|
51
|
+
* Binary minus operation.
|
|
52
|
+
* @param {function} left - The left operand function.
|
|
53
|
+
* @param {function} right - The right operand function.
|
|
54
|
+
* @param {Object} [context] - The context.
|
|
55
|
+
* @returns {function} The binary minus function.
|
|
56
|
+
*/
|
|
57
|
+
"binary-"(left: Function, right: Function, context?: any): Function;
|
|
58
|
+
/**
|
|
59
|
+
* Binary multiplication operation.
|
|
60
|
+
* @param {function} left - The left operand function.
|
|
61
|
+
* @param {function} right - The right operand function.
|
|
62
|
+
* @param {Object} [context] - The context.
|
|
63
|
+
* @returns {function} The binary multiplication function.
|
|
64
|
+
*/
|
|
65
|
+
"binary*"(left: Function, right: Function, context?: any): Function;
|
|
66
|
+
"binary/"(left: any, right: any, context: any): (scope: any, locals: any, assign: any, inputs: any) => number | {
|
|
23
67
|
value: number;
|
|
24
68
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"binary
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
69
|
+
/**
|
|
70
|
+
* Binary division operation.
|
|
71
|
+
* @param {function} left - The left operand function.
|
|
72
|
+
* @param {function} right - The right operand function.
|
|
73
|
+
* @param {Object} [context] - The context.
|
|
74
|
+
* @returns {function} The binary division function.
|
|
75
|
+
*/
|
|
76
|
+
"binary%"(left: Function, right: Function, context?: any): Function;
|
|
77
|
+
/**
|
|
78
|
+
* Binary strict equality operation.
|
|
79
|
+
* @param {function} left - The left operand function.
|
|
80
|
+
* @param {function} right - The right operand function.
|
|
81
|
+
* @param {Object} [context] - The context.
|
|
82
|
+
* @returns {function} The binary strict equality function.
|
|
83
|
+
*/
|
|
84
|
+
"binary==="(left: Function, right: Function, context?: any): Function;
|
|
85
|
+
/**
|
|
86
|
+
* Binary strict inequality operation.
|
|
87
|
+
* @param {function} left - The left operand function.
|
|
88
|
+
* @param {function} right - The right operand function.
|
|
89
|
+
* @param {Object} [context] - The context.
|
|
90
|
+
* @returns {function} The binary strict inequality function.
|
|
91
|
+
*/
|
|
92
|
+
"binary!=="(left: Function, right: Function, context?: any): Function;
|
|
93
|
+
/**
|
|
94
|
+
* Binary equality operation.
|
|
95
|
+
* @param {function} left - The left operand function.
|
|
96
|
+
* @param {function} right - The right operand function.
|
|
97
|
+
* @param {Object} [context] - The context.
|
|
98
|
+
* @returns {function} The binary equality function.
|
|
99
|
+
*/
|
|
100
|
+
"binary=="(left: Function, right: Function, context?: any): Function;
|
|
101
|
+
/**
|
|
102
|
+
* Binary inequality operation.
|
|
103
|
+
* @param {function} left - The left operand function.
|
|
104
|
+
* @param {function} right - The right operand function.
|
|
105
|
+
* @param {Object} [context] - The context.
|
|
106
|
+
* @returns {function} The binary inequality function.
|
|
107
|
+
*/
|
|
108
|
+
"binary!="(left: Function, right: Function, context?: any): Function;
|
|
109
|
+
/**
|
|
110
|
+
* Binary less-than operation.
|
|
111
|
+
* @param {function} left - The left operand function.
|
|
112
|
+
* @param {function} right - The right operand function.
|
|
113
|
+
* @param {Object} [context] - The context.
|
|
114
|
+
* @returns {function} The binary less-than function.
|
|
115
|
+
*/
|
|
116
|
+
"binary<"(left: Function, right: Function, context?: any): Function;
|
|
117
|
+
/**
|
|
118
|
+
* Binary greater-than operation.
|
|
119
|
+
* @param {function} left - The left operand function.
|
|
120
|
+
* @param {function} right - The right operand function.
|
|
121
|
+
* @param {Object} [context] - The context.
|
|
122
|
+
* @returns {function} The binary greater-than function.
|
|
123
|
+
*/
|
|
124
|
+
"binary>"(left: Function, right: Function, context?: any): Function;
|
|
125
|
+
/**
|
|
126
|
+
* Binary less-than-or-equal-to operation.
|
|
127
|
+
* @param {function} left - The left operand function.
|
|
128
|
+
* @param {function} right - The right operand function.
|
|
129
|
+
* @param {Object} [context] - The context.
|
|
130
|
+
* @returns {function} The binary less-than-or-equal-to function.
|
|
131
|
+
*/
|
|
132
|
+
"binary<="(left: Function, right: Function, context?: any): Function;
|
|
133
|
+
/**
|
|
134
|
+
* Binary greater-than-or-equal-to operation.
|
|
135
|
+
* @param {function} left - The left operand function.
|
|
136
|
+
* @param {function} right - The right operand function.
|
|
137
|
+
* @param {Object} [context] - The context.
|
|
138
|
+
* @returns {function} The binary greater-than-or-equal-to function.
|
|
139
|
+
*/
|
|
140
|
+
"binary>="(left: Function, right: Function, context?: any): Function;
|
|
141
|
+
/**
|
|
142
|
+
* Binary logical AND operation.
|
|
143
|
+
* @param {function} left - The left operand function.
|
|
144
|
+
* @param {function} right - The right operand function.
|
|
145
|
+
* @param {Object} [context] - The context.
|
|
146
|
+
* @returns {function} The binary logical AND function.
|
|
147
|
+
*/
|
|
148
|
+
"binary&&"(left: Function, right: Function, context?: any): Function;
|
|
149
|
+
/**
|
|
150
|
+
* Binary logical OR operation.
|
|
151
|
+
* @param {function} left - The left operand function.
|
|
152
|
+
* @param {function} right - The right operand function.
|
|
153
|
+
* @param {Object} [context] - The context.
|
|
154
|
+
* @returns {function} The binary logical OR function.
|
|
155
|
+
*/
|
|
156
|
+
"binary||"(left: Function, right: Function, context?: any): Function;
|
|
157
|
+
/**
|
|
158
|
+
* Ternary conditional operation.
|
|
159
|
+
* @param {function} test - The test function.
|
|
160
|
+
* @param {function} alternate - The alternate function.
|
|
161
|
+
* @param {function} consequent - The consequent function.
|
|
162
|
+
* @param {Object} [context] - The context.
|
|
163
|
+
* @returns {function} The ternary conditional function.
|
|
164
|
+
*/
|
|
165
|
+
"ternary?:"(test: Function, alternate: Function, consequent: Function, context?: any): Function;
|
|
166
|
+
/**
|
|
167
|
+
* Returns the value of a literal.
|
|
168
|
+
* @param {*} value - The literal value.
|
|
169
|
+
* @param {Object} [context] - The context.
|
|
170
|
+
* @returns {function} The function returning the literal value.
|
|
171
|
+
*/
|
|
172
|
+
value(value: any, context?: any): Function;
|
|
173
|
+
/**
|
|
174
|
+
* Returns the value of an identifier.
|
|
175
|
+
* @param {string} name - The identifier name.
|
|
176
|
+
* @param {Object} [context] - The context.
|
|
177
|
+
* @param {boolean} [create] - Whether to create the identifier if it does not exist.
|
|
178
|
+
* @returns {function} The function returning the identifier value.
|
|
179
|
+
*/
|
|
180
|
+
identifier(name: string, context?: any, create?: boolean): Function;
|
|
181
|
+
/**
|
|
182
|
+
* Returns the value of a computed member expression.
|
|
183
|
+
* @param {function} left - The left operand function.
|
|
184
|
+
* @param {function} right - The right operand function.
|
|
185
|
+
* @param {Object} [context] - The context.
|
|
186
|
+
* @param {boolean} [create] - Whether to create the member if it does not exist.
|
|
187
|
+
* @returns {function} The function returning the computed member value.
|
|
188
|
+
*/
|
|
189
|
+
computedMember(left: Function, right: Function, context?: any, create?: boolean): Function;
|
|
190
|
+
/**
|
|
191
|
+
* Returns the value of a non-computed member expression.
|
|
192
|
+
* @param {function} left - The left operand function.
|
|
193
|
+
* @param {string} right - The right operand function.
|
|
194
|
+
* @param {Object} [context] - The context.
|
|
195
|
+
* @param {boolean} [create] - Whether to create the member if it does not exist.
|
|
196
|
+
* @returns {function} The function returning the non-computed member value.
|
|
197
|
+
*/
|
|
198
|
+
nonComputedMember(left: Function, right: string, context?: any, create?: boolean): Function;
|
|
199
|
+
/**
|
|
200
|
+
* Returns the value of an input expression.
|
|
201
|
+
* @param {function} input - The input function.
|
|
202
|
+
* @param {number} watchId - The watch identifier.
|
|
203
|
+
* @returns {function} The function returning the input value.
|
|
204
|
+
*/
|
|
205
|
+
inputs(input: Function, watchId: number): Function;
|
|
57
206
|
}
|