@angular-wave/angular.ts 0.0.47 → 0.0.48
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/angular.spec.js +1 -2
- package/src/animations/animate-queue.js +0 -1
- package/src/animations/animation.js +1 -1
- package/src/animations/raf-scheduler.js +0 -1
- package/src/animations/shared.js +1 -1
- package/src/core/animate/animate.js +0 -1
- package/src/core/compile/compile.spec.js +1 -1
- package/src/core/location/location.spec.js +1 -1
- package/src/core/parser/ast-type.js +22 -0
- package/src/core/parser/ast.js +422 -0
- package/src/core/parser/compiler.js +561 -0
- package/src/core/parser/interpreter.js +422 -0
- package/src/core/parser/lexer.js +257 -0
- package/src/core/parser/parse.js +9 -1930
- package/src/core/parser/parse.spec.js +2 -2
- package/src/core/parser/parser.js +39 -0
- package/src/core/parser/shared.js +228 -0
- package/src/core/q/q.spec.js +0 -1
- package/src/core/sce/sce.js +3 -6
- package/src/core/scope/scope.js +19 -11
- package/src/core/task-tracker-factory.js +0 -1
- package/src/directive/class/class.js +0 -2
- package/src/directive/form/form.js +0 -3
- package/src/directive/include/include.js +1 -1
- package/src/directive/include/include.spec.js +0 -1
- package/src/directive/input/input.js +1 -2
- package/src/directive/model/model.js +1 -3
- package/src/directive/model/model.spec.js +0 -1
- package/src/directive/repeat/repeat.spec.js +0 -2
- package/src/exts/aria/aria.js +0 -1
- package/src/filters/filter.spec.js +0 -1
- package/src/injector.js +1 -1
- package/src/injector.spec.js +0 -5
- package/src/loader.js +0 -5
- package/src/services/cookie-reader.js +0 -1
- package/src/services/http/http.spec.js +0 -2
- package/src/shared/utils.js +18 -7
- package/src/types.js +10 -0
- package/types/core/parser/ast-type.d.ts +20 -0
- package/types/core/parser/ast.d.ts +78 -0
- package/types/core/parser/compiler.d.ts +49 -0
- package/types/core/parser/interpreter.d.ts +57 -0
- package/types/core/parser/parse.d.ts +79 -0
- package/types/core/parser/parser.d.ts +22 -0
- package/types/core/parser/shared.d.ts +29 -0
- package/types/core/scope/scope.d.ts +9 -2
- package/types/shared/utils.d.ts +18 -5
- package/types/types.d.ts +1 -0
- package/types-back/index.d.ts +0 -12
package/src/shared/utils.js
CHANGED
|
@@ -309,7 +309,6 @@ export function trim(value) {
|
|
|
309
309
|
return isString(value) ? value.trim() : value;
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
-
// eslint-disable-next-line camelcase
|
|
313
312
|
export function snakeCase(name, separator) {
|
|
314
313
|
const modseparator = separator || "_";
|
|
315
314
|
return name.replace(
|
|
@@ -399,7 +398,7 @@ export function forEachSorted(obj, iterator, context) {
|
|
|
399
398
|
|
|
400
399
|
/**
|
|
401
400
|
* when using forEach the params are value, key, but it is often useful to have key, value.
|
|
402
|
-
* @param {function(string, *)} iteratorFn
|
|
401
|
+
* @param {function(string, *):any} iteratorFn
|
|
403
402
|
* @returns {function(*, string)}
|
|
404
403
|
*/
|
|
405
404
|
export function reverseParams(iteratorFn) {
|
|
@@ -473,8 +472,8 @@ export function baseExtend(dst, objs, deep) {
|
|
|
473
472
|
* @param {...Object} src Source object(s).
|
|
474
473
|
* @returns {Object} Reference to `dst`.
|
|
475
474
|
*/
|
|
476
|
-
export function extend(dst) {
|
|
477
|
-
return baseExtend(dst,
|
|
475
|
+
export function extend(dst, ...src) {
|
|
476
|
+
return baseExtend(dst, src, false);
|
|
478
477
|
}
|
|
479
478
|
|
|
480
479
|
/**
|
|
@@ -515,15 +514,27 @@ export function merge(dst, ...src) {
|
|
|
515
514
|
return baseExtend(dst, src, true);
|
|
516
515
|
}
|
|
517
516
|
|
|
517
|
+
/**
|
|
518
|
+
* @param {string} str
|
|
519
|
+
* @returns {number}
|
|
520
|
+
*/
|
|
518
521
|
export function toInt(str) {
|
|
519
522
|
return parseInt(str, 10);
|
|
520
523
|
}
|
|
521
524
|
|
|
525
|
+
/**
|
|
526
|
+
* @param {any} num
|
|
527
|
+
* @returns {boolean}
|
|
528
|
+
*/
|
|
522
529
|
export function isNumberNaN(num) {
|
|
523
|
-
// eslint-disable-next-line no-self-compare
|
|
524
530
|
return Number.isNaN(num);
|
|
525
531
|
}
|
|
526
532
|
|
|
533
|
+
/**
|
|
534
|
+
* @param {Object} parent
|
|
535
|
+
* @param {Object} extra
|
|
536
|
+
* @returns {Object}
|
|
537
|
+
*/
|
|
527
538
|
export function inherit(parent, extra) {
|
|
528
539
|
return extend(Object.create(parent), extra);
|
|
529
540
|
}
|
|
@@ -599,7 +610,7 @@ export function isElement(node) {
|
|
|
599
610
|
*
|
|
600
611
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nodeName)
|
|
601
612
|
*
|
|
602
|
-
* @param {JQLite|Element} element
|
|
613
|
+
* @param {import('../shared/jqlite/jqlite').JQLite|Element} element
|
|
603
614
|
* @returns
|
|
604
615
|
*/
|
|
605
616
|
export function getNodeName(element) {
|
|
@@ -699,7 +710,7 @@ export function simpleCompare(a, b) {
|
|
|
699
710
|
export function equals(o1, o2) {
|
|
700
711
|
if (o1 === o2) return true;
|
|
701
712
|
if (o1 === null || o2 === null) return false;
|
|
702
|
-
|
|
713
|
+
|
|
703
714
|
if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN
|
|
704
715
|
const t1 = typeof o1;
|
|
705
716
|
const t2 = typeof o2;
|
package/src/types.js
CHANGED
|
@@ -11,6 +11,16 @@
|
|
|
11
11
|
* @template T
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* @typedef {function(any, any=): any} CompiledExpression
|
|
16
|
+
* @property {boolean} literal - Indicates if the expression is a literal.
|
|
17
|
+
* @property {boolean} constant - Indicates if the expression is constant.
|
|
18
|
+
* @property {function(any, any): any} assign - Assigns a value to a context. If value is not provided,
|
|
19
|
+
* undefined is gonna be used since the implementation
|
|
20
|
+
* does not check the parameter. Let's force a value for consistency. If consumer
|
|
21
|
+
* wants to undefine it, pass the undefined value explicitly.
|
|
22
|
+
*/
|
|
23
|
+
|
|
14
24
|
/**
|
|
15
25
|
* @typedef {Object} ComponentOptions
|
|
16
26
|
* @description Component definition object (a simplified directive definition object)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type ASTType = ("Program" | "ExpressionStatement" | "AssignmentExpression" | "ConditionalExpression" | "LogicalExpression" | "BinaryExpression" | "UnaryExpression" | "CallExpression" | "MemberExpression" | "Identifier" | "Literal" | "ArrayExpression" | "Property" | "ObjectExpression" | "ThisExpression" | "LocalsExpression" | "NGValueParameter");
|
|
2
|
+
export namespace ASTType {
|
|
3
|
+
let Program: string;
|
|
4
|
+
let ExpressionStatement: string;
|
|
5
|
+
let AssignmentExpression: string;
|
|
6
|
+
let ConditionalExpression: string;
|
|
7
|
+
let LogicalExpression: string;
|
|
8
|
+
let BinaryExpression: string;
|
|
9
|
+
let UnaryExpression: string;
|
|
10
|
+
let CallExpression: string;
|
|
11
|
+
let MemberExpression: string;
|
|
12
|
+
let Identifier: string;
|
|
13
|
+
let Literal: string;
|
|
14
|
+
let ArrayExpression: string;
|
|
15
|
+
let Property: string;
|
|
16
|
+
let ObjectExpression: string;
|
|
17
|
+
let ThisExpression: string;
|
|
18
|
+
let LocalsExpression: string;
|
|
19
|
+
let NGValueParameter: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export function AST(lexer: any, options: any): void;
|
|
2
|
+
export class AST {
|
|
3
|
+
constructor(lexer: any, options: any);
|
|
4
|
+
lexer: any;
|
|
5
|
+
options: any;
|
|
6
|
+
ast(text: any): {
|
|
7
|
+
type: string;
|
|
8
|
+
body: {
|
|
9
|
+
type: string;
|
|
10
|
+
expression: any;
|
|
11
|
+
}[];
|
|
12
|
+
};
|
|
13
|
+
text: any;
|
|
14
|
+
tokens: any;
|
|
15
|
+
program(): {
|
|
16
|
+
type: string;
|
|
17
|
+
body: {
|
|
18
|
+
type: string;
|
|
19
|
+
expression: any;
|
|
20
|
+
}[];
|
|
21
|
+
};
|
|
22
|
+
expressionStatement(): {
|
|
23
|
+
type: string;
|
|
24
|
+
expression: any;
|
|
25
|
+
};
|
|
26
|
+
filterChain(): any;
|
|
27
|
+
expression(): any;
|
|
28
|
+
assignment(): any;
|
|
29
|
+
ternary(): any;
|
|
30
|
+
logicalOR(): any;
|
|
31
|
+
logicalAND(): any;
|
|
32
|
+
equality(): any;
|
|
33
|
+
relational(): any;
|
|
34
|
+
additive(): any;
|
|
35
|
+
multiplicative(): any;
|
|
36
|
+
unary(): any;
|
|
37
|
+
primary(): any;
|
|
38
|
+
filter(baseExpression: any): {
|
|
39
|
+
type: string;
|
|
40
|
+
callee: {
|
|
41
|
+
type: string;
|
|
42
|
+
name: any;
|
|
43
|
+
};
|
|
44
|
+
arguments: any[];
|
|
45
|
+
filter: boolean;
|
|
46
|
+
};
|
|
47
|
+
parseArguments(): any;
|
|
48
|
+
identifier(): {
|
|
49
|
+
type: string;
|
|
50
|
+
name: any;
|
|
51
|
+
};
|
|
52
|
+
constant(): {
|
|
53
|
+
type: string;
|
|
54
|
+
value: any;
|
|
55
|
+
};
|
|
56
|
+
arrayDeclaration(): any;
|
|
57
|
+
object(): {
|
|
58
|
+
type: string;
|
|
59
|
+
properties: {
|
|
60
|
+
type: string;
|
|
61
|
+
kind: string;
|
|
62
|
+
}[];
|
|
63
|
+
};
|
|
64
|
+
throwError(msg: any, token: any): never;
|
|
65
|
+
consume(e1: any): any;
|
|
66
|
+
peekToken(): any;
|
|
67
|
+
peek(e1: any, e2: any, e3: any, e4: any): any;
|
|
68
|
+
peekAhead(i: any, e1: any, e2: any, e3: any, e4: any): any;
|
|
69
|
+
expect(e1: any, e2: any, e3: any, e4: any): any;
|
|
70
|
+
selfReferential: {
|
|
71
|
+
this: {
|
|
72
|
+
type: string;
|
|
73
|
+
};
|
|
74
|
+
$locals: {
|
|
75
|
+
type: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export function ASTCompiler($filter: any): void;
|
|
2
|
+
export class ASTCompiler {
|
|
3
|
+
constructor($filter: any);
|
|
4
|
+
$filter: any;
|
|
5
|
+
compile(ast: any): any;
|
|
6
|
+
state: {
|
|
7
|
+
nextId: number;
|
|
8
|
+
filters: {};
|
|
9
|
+
fn: {
|
|
10
|
+
vars: any[];
|
|
11
|
+
body: any[];
|
|
12
|
+
own: {};
|
|
13
|
+
};
|
|
14
|
+
assign: {
|
|
15
|
+
vars: any[];
|
|
16
|
+
body: any[];
|
|
17
|
+
own: {};
|
|
18
|
+
};
|
|
19
|
+
inputs: any[];
|
|
20
|
+
};
|
|
21
|
+
stage: string;
|
|
22
|
+
watchFns(): string;
|
|
23
|
+
generateFunction(name: any, params: any): string;
|
|
24
|
+
filterPrefix(): string;
|
|
25
|
+
varsPrefix(section: any): string;
|
|
26
|
+
body(section: any): any;
|
|
27
|
+
recurse(ast: any, intoId: any, nameId: any, recursionFn: any, create: any, skipWatchIdCheck: any): void;
|
|
28
|
+
getHasOwnProperty(element: any, property: any): any;
|
|
29
|
+
assign(id: any, value: any): any;
|
|
30
|
+
filter(filterName: any): any;
|
|
31
|
+
ifDefined(id: any, defaultValue: any): string;
|
|
32
|
+
plus(left: any, right: any): string;
|
|
33
|
+
return_(id: any): void;
|
|
34
|
+
if_(test: any, alternate: any, consequent: any): void;
|
|
35
|
+
not(expression: any): string;
|
|
36
|
+
isNull(expression: any): string;
|
|
37
|
+
notNull(expression: any): string;
|
|
38
|
+
nonComputedMember(left: any, right: any): string;
|
|
39
|
+
computedMember(left: any, right: any): string;
|
|
40
|
+
member(left: any, right: any, computed: any): string;
|
|
41
|
+
getStringValue(item: any): void;
|
|
42
|
+
lazyRecurse(ast: any, intoId: any, nameId: any, recursionFn: any, create: any, skipWatchIdCheck: any): () => void;
|
|
43
|
+
lazyAssign(id: any, value: any): () => void;
|
|
44
|
+
stringEscapeRegex: RegExp;
|
|
45
|
+
stringEscapeFn(c: any): string;
|
|
46
|
+
escape(value: any): any;
|
|
47
|
+
nextId(skip: any, init: any): string;
|
|
48
|
+
current(): any;
|
|
49
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export function ASTInterpreter($filter: any): void;
|
|
2
|
+
export class ASTInterpreter {
|
|
3
|
+
constructor($filter: any);
|
|
4
|
+
$filter: any;
|
|
5
|
+
compile(ast: any): any;
|
|
6
|
+
recurse(ast: any, context: any, create: any): any;
|
|
7
|
+
"unary+": (argument: any, context: any) => (scope: any, locals: any, assign: any, inputs: any) => any;
|
|
8
|
+
"unary-": (argument: any, context: any) => (scope: any, locals: any, assign: any, inputs: any) => any;
|
|
9
|
+
"unary!": (argument: any, context: any) => (scope: any, locals: any, assign: any, inputs: any) => boolean | {
|
|
10
|
+
value: boolean;
|
|
11
|
+
};
|
|
12
|
+
"binary+": (left: any, right: any, context: any) => (scope: any, locals: any, assign: any, inputs: any) => any;
|
|
13
|
+
"binary-": (left: any, right: any, context: any) => (scope: any, locals: any, assign: any, inputs: any) => number | {
|
|
14
|
+
value: number;
|
|
15
|
+
};
|
|
16
|
+
"binary*": (left: any, right: any, context: any) => (scope: any, locals: any, assign: any, inputs: any) => number | {
|
|
17
|
+
value: number;
|
|
18
|
+
};
|
|
19
|
+
"binary/": (left: any, right: any, context: any) => (scope: any, locals: any, assign: any, inputs: any) => number | {
|
|
20
|
+
value: number;
|
|
21
|
+
};
|
|
22
|
+
"binary%": (left: any, right: any, context: any) => (scope: any, locals: any, assign: any, inputs: any) => number | {
|
|
23
|
+
value: number;
|
|
24
|
+
};
|
|
25
|
+
"binary===": (left: any, right: any, context: any) => (scope: any, locals: any, assign: any, inputs: any) => boolean | {
|
|
26
|
+
value: boolean;
|
|
27
|
+
};
|
|
28
|
+
"binary!==": (left: any, right: any, context: any) => (scope: any, locals: any, assign: any, inputs: any) => boolean | {
|
|
29
|
+
value: boolean;
|
|
30
|
+
};
|
|
31
|
+
"binary==": (left: any, right: any, context: any) => (scope: any, locals: any, assign: any, inputs: any) => boolean | {
|
|
32
|
+
value: boolean;
|
|
33
|
+
};
|
|
34
|
+
"binary!=": (left: any, right: any, context: any) => (scope: any, locals: any, assign: any, inputs: any) => boolean | {
|
|
35
|
+
value: boolean;
|
|
36
|
+
};
|
|
37
|
+
"binary<": (left: any, right: any, context: any) => (scope: any, locals: any, assign: any, inputs: any) => boolean | {
|
|
38
|
+
value: boolean;
|
|
39
|
+
};
|
|
40
|
+
"binary>": (left: any, right: any, context: any) => (scope: any, locals: any, assign: any, inputs: any) => boolean | {
|
|
41
|
+
value: boolean;
|
|
42
|
+
};
|
|
43
|
+
"binary<=": (left: any, right: any, context: any) => (scope: any, locals: any, assign: any, inputs: any) => boolean | {
|
|
44
|
+
value: boolean;
|
|
45
|
+
};
|
|
46
|
+
"binary>=": (left: any, right: any, context: any) => (scope: any, locals: any, assign: any, inputs: any) => boolean | {
|
|
47
|
+
value: boolean;
|
|
48
|
+
};
|
|
49
|
+
"binary&&": (left: any, right: any, context: any) => (scope: any, locals: any, assign: any, inputs: any) => any;
|
|
50
|
+
"binary||": (left: any, right: any, context: any) => (scope: any, locals: any, assign: any, inputs: any) => any;
|
|
51
|
+
"ternary?:": (test: any, alternate: any, consequent: any, context: any) => (scope: any, locals: any, assign: any, inputs: any) => any;
|
|
52
|
+
value(value: any, context: any): () => any;
|
|
53
|
+
identifier(name: any, context: any, create: any): (scope: any, locals: any) => any;
|
|
54
|
+
computedMember(left: any, right: any, context: any, create: any): (scope: any, locals: any, assign: any, inputs: any) => any;
|
|
55
|
+
nonComputedMember(left: any, right: any, context: any, create: any): (scope: any, locals: any, assign: any, inputs: any) => any;
|
|
56
|
+
inputs(input: any, watchId: any): (scope: any, value: any, locals: any, inputs: any) => any;
|
|
57
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ngdoc provider
|
|
3
|
+
* @name $parseProvider
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* `$parseProvider` can be used for configuring the default behavior of the {@link ng.$parse $parse}
|
|
8
|
+
* service.
|
|
9
|
+
*/
|
|
10
|
+
export function $ParseProvider(): void;
|
|
11
|
+
export class $ParseProvider {
|
|
12
|
+
/**
|
|
13
|
+
* @ngdoc method
|
|
14
|
+
* @name $parseProvider#addLiteral
|
|
15
|
+
* @description
|
|
16
|
+
*
|
|
17
|
+
* Configure $parse service to add literal values that will be present as literal at expressions.
|
|
18
|
+
*
|
|
19
|
+
* @param {string} literalName Token for the literal value. The literal name value must be a valid literal name.
|
|
20
|
+
* @param {*} literalValue Value for this literal. All literal values must be primitives or `undefined`.
|
|
21
|
+
*
|
|
22
|
+
**/
|
|
23
|
+
addLiteral: (literalName: string, literalValue: any) => void;
|
|
24
|
+
/**
|
|
25
|
+
* @ngdoc method
|
|
26
|
+
* @name $parseProvider#setIdentifierFns
|
|
27
|
+
*
|
|
28
|
+
* @description
|
|
29
|
+
*
|
|
30
|
+
* Allows defining the set of characters that are allowed in AngularJS expressions. The function
|
|
31
|
+
* `identifierStart` will get called to know if a given character is a valid character to be the
|
|
32
|
+
* first character for an identifier. The function `identifierContinue` will get called to know if
|
|
33
|
+
* a given character is a valid character to be a follow-up identifier character. The functions
|
|
34
|
+
* `identifierStart` and `identifierContinue` will receive as arguments the single character to be
|
|
35
|
+
* identifier and the character code point. These arguments will be `string` and `numeric`. Keep in
|
|
36
|
+
* mind that the `string` parameter can be two characters long depending on the character
|
|
37
|
+
* representation. It is expected for the function to return `true` or `false`, whether that
|
|
38
|
+
* character is allowed or not.
|
|
39
|
+
*
|
|
40
|
+
* Since this function will be called extensively, keep the implementation of these functions fast,
|
|
41
|
+
* as the performance of these functions have a direct impact on the expressions parsing speed.
|
|
42
|
+
*
|
|
43
|
+
* @param {function=} identifierStart The function that will decide whether the given character is
|
|
44
|
+
* a valid identifier start character.
|
|
45
|
+
* @param {function=} identifierContinue The function that will decide whether the given character is
|
|
46
|
+
* a valid identifier continue character.
|
|
47
|
+
*/
|
|
48
|
+
setIdentifierFns: (identifierStart?: Function | undefined, identifierContinue?: Function | undefined) => this;
|
|
49
|
+
$get: (string | (($filter: any) => {
|
|
50
|
+
(exp: any, interceptorFn: any): any;
|
|
51
|
+
$$getAst: (exp: any) => {
|
|
52
|
+
type: string;
|
|
53
|
+
body: {
|
|
54
|
+
type: string;
|
|
55
|
+
expression: any;
|
|
56
|
+
}[];
|
|
57
|
+
};
|
|
58
|
+
}))[];
|
|
59
|
+
}
|
|
60
|
+
export function inputsWatchDelegate(scope: any, listener: any, objectEquality: any, parsedExpression: any): any;
|
|
61
|
+
export function oneTimeWatchDelegate(scope: any, listener: any, objectEquality: any, parsedExpression: any): any;
|
|
62
|
+
export function chainInterceptors(first: any, second: any): {
|
|
63
|
+
(value: any): any;
|
|
64
|
+
$stateful: any;
|
|
65
|
+
$$pure: any;
|
|
66
|
+
};
|
|
67
|
+
export function expressionInputDirtyCheck(newValue: any, oldValueOfValue: any, compareObjectIdentity: any): boolean;
|
|
68
|
+
export function isAllDefined(value: any): boolean;
|
|
69
|
+
export const $parseMinErr: (arg0: string, ...arg1: any[]) => Error;
|
|
70
|
+
export namespace literals {
|
|
71
|
+
let _true: boolean;
|
|
72
|
+
export { _true as true };
|
|
73
|
+
let _false: boolean;
|
|
74
|
+
export { _false as false };
|
|
75
|
+
let _null: any;
|
|
76
|
+
export { _null as null };
|
|
77
|
+
export let undefined: any;
|
|
78
|
+
}
|
|
79
|
+
export type ParseService = (arg0: string | ((arg0: import("../scope/scope").Scope) => any), arg1: ((arg0: any, arg1: Scope, arg2: any) => any) | undefined, arg2: boolean | undefined) => import("../../types").CompiledExpression;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @constructor
|
|
3
|
+
*/
|
|
4
|
+
export class Parser {
|
|
5
|
+
constructor(lexer: any, $filter: any, options: any);
|
|
6
|
+
ast: AST;
|
|
7
|
+
astCompiler: ASTInterpreter | ASTCompiler;
|
|
8
|
+
parse(text: any): any;
|
|
9
|
+
getAst(exp: any): {
|
|
10
|
+
ast: {
|
|
11
|
+
type: string;
|
|
12
|
+
body: {
|
|
13
|
+
type: string;
|
|
14
|
+
expression: any;
|
|
15
|
+
}[];
|
|
16
|
+
};
|
|
17
|
+
oneTime: boolean;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
import { AST } from "./ast";
|
|
21
|
+
import { ASTInterpreter } from "./interpreter";
|
|
22
|
+
import { ASTCompiler } from "./compiler";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts parameter to strings property name for use as keys in an object.
|
|
3
|
+
* Any non-string object, including a number, is typecasted into a string via the toString method.
|
|
4
|
+
* {@link https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Property_accessors#Property_names}
|
|
5
|
+
*
|
|
6
|
+
* @param {!any} name
|
|
7
|
+
* @returns {string}
|
|
8
|
+
*/
|
|
9
|
+
export function getStringValue(name: any): string;
|
|
10
|
+
export function ifDefined(v: any, d: any): any;
|
|
11
|
+
export function plusFn(l: any, r: any): any;
|
|
12
|
+
export function isStateless($filter: any, filterName: any): boolean;
|
|
13
|
+
export function isPure(node: any, parentIsPure: any): any;
|
|
14
|
+
export function findConstantAndWatchExpressions(ast: any, $filter: any, parentIsPure: any): void;
|
|
15
|
+
export function getInputs(body: any): any;
|
|
16
|
+
export function isAssignable(ast: any): boolean;
|
|
17
|
+
export function assignableAST(ast: any): {
|
|
18
|
+
type: string;
|
|
19
|
+
left: any;
|
|
20
|
+
right: {
|
|
21
|
+
type: string;
|
|
22
|
+
};
|
|
23
|
+
operator: string;
|
|
24
|
+
};
|
|
25
|
+
export function isLiteral(ast: any): boolean;
|
|
26
|
+
export function isConstant(ast: any): any;
|
|
27
|
+
export function getValueOf(value: any): any;
|
|
28
|
+
export const PURITY_ABSOLUTE: 1;
|
|
29
|
+
export const PURITY_RELATIVE: 2;
|
|
@@ -45,7 +45,10 @@ export const TTL: TTL;
|
|
|
45
45
|
/** @type {AsyncQueueTask[]} */
|
|
46
46
|
export const $$asyncQueue: AsyncQueueTask[];
|
|
47
47
|
export const $$postDigestQueue: any[];
|
|
48
|
-
|
|
48
|
+
/**
|
|
49
|
+
* @type {Function[]}
|
|
50
|
+
*/
|
|
51
|
+
export const $$applyAsyncQueue: Function[];
|
|
49
52
|
/**
|
|
50
53
|
* Provider responsible for instantiating the initial scope, aka - root scope.
|
|
51
54
|
* Every application has a single root {@link ng.$rootScope.Scope scope}.
|
|
@@ -58,7 +61,7 @@ export const $$applyAsyncQueue: any[];
|
|
|
58
61
|
*
|
|
59
62
|
*/
|
|
60
63
|
export class $RootScopeProvider {
|
|
61
|
-
$get: (string | ((exceptionHandler:
|
|
64
|
+
$get: (string | ((exceptionHandler: import("../exception-handler").ErrorHandler, parse: angular.IParseService, browser: import("../../services/browser").Browser) => Scope))[];
|
|
62
65
|
}
|
|
63
66
|
/**
|
|
64
67
|
* DESIGN NOTES
|
|
@@ -664,6 +667,10 @@ export class Scope {
|
|
|
664
667
|
* @private
|
|
665
668
|
*/
|
|
666
669
|
private $$postDigest;
|
|
670
|
+
/**
|
|
671
|
+
* @private
|
|
672
|
+
*/
|
|
673
|
+
private retry;
|
|
667
674
|
clearPhase(): void;
|
|
668
675
|
/**
|
|
669
676
|
* @param {number} count
|
package/types/shared/utils.d.ts
CHANGED
|
@@ -228,7 +228,7 @@ export function forEach(obj: any | any[], iterator: Function, context?: any | un
|
|
|
228
228
|
export function forEachSorted(obj: any, iterator: any, context: any): string[];
|
|
229
229
|
/**
|
|
230
230
|
* when using forEach the params are value, key, but it is often useful to have key, value.
|
|
231
|
-
* @param {function(string, *)} iteratorFn
|
|
231
|
+
* @param {function(string, *):any} iteratorFn
|
|
232
232
|
* @returns {function(*, string)}
|
|
233
233
|
*/
|
|
234
234
|
export function reverseParams(iteratorFn: (arg0: string, arg1: any) => any): (arg0: any, arg1: string) => any;
|
|
@@ -257,7 +257,7 @@ export function baseExtend(dst: any, objs: any, deep: any): any;
|
|
|
257
257
|
* @param {...Object} src Source object(s).
|
|
258
258
|
* @returns {Object} Reference to `dst`.
|
|
259
259
|
*/
|
|
260
|
-
export function extend(dst: any, ...
|
|
260
|
+
export function extend(dst: any, ...src: any[]): any;
|
|
261
261
|
/**
|
|
262
262
|
* @module angular
|
|
263
263
|
* @function merge
|
|
@@ -293,8 +293,21 @@ export function extend(dst: any, ...args: any[]): any;
|
|
|
293
293
|
* @returns {Object} Reference to `dst`.
|
|
294
294
|
*/
|
|
295
295
|
export function merge(dst: any, ...src: any[]): any;
|
|
296
|
-
|
|
296
|
+
/**
|
|
297
|
+
* @param {string} str
|
|
298
|
+
* @returns {number}
|
|
299
|
+
*/
|
|
300
|
+
export function toInt(str: string): number;
|
|
301
|
+
/**
|
|
302
|
+
* @param {any} num
|
|
303
|
+
* @returns {boolean}
|
|
304
|
+
*/
|
|
297
305
|
export function isNumberNaN(num: any): boolean;
|
|
306
|
+
/**
|
|
307
|
+
* @param {Object} parent
|
|
308
|
+
* @param {Object} extra
|
|
309
|
+
* @returns {Object}
|
|
310
|
+
*/
|
|
298
311
|
export function inherit(parent: any, extra: any): any;
|
|
299
312
|
/**
|
|
300
313
|
* @module angular
|
|
@@ -349,10 +362,10 @@ export function isElement(node: any): boolean;
|
|
|
349
362
|
*
|
|
350
363
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nodeName)
|
|
351
364
|
*
|
|
352
|
-
* @param {JQLite|Element} element
|
|
365
|
+
* @param {import('../shared/jqlite/jqlite').JQLite|Element} element
|
|
353
366
|
* @returns
|
|
354
367
|
*/
|
|
355
|
-
export function getNodeName(element: JQLite | Element): string;
|
|
368
|
+
export function getNodeName(element: import("../shared/jqlite/jqlite").JQLite | Element): string;
|
|
356
369
|
export function includes(array: any, obj: any): boolean;
|
|
357
370
|
/**
|
|
358
371
|
* Removes the first occurrence of a specified value from an array.
|
package/types/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type BootstrapConfig = any;
|
|
2
2
|
export type Injectable<T_1> = Function | Array<string | Function>;
|
|
3
|
+
export type CompiledExpression = (arg0: any, arg1: any | undefined) => any;
|
|
3
4
|
export type ComponentOptions = any;
|
|
4
5
|
export type ControllerConstructor = Function;
|
|
5
6
|
export type OnChangesObject = any;
|
package/types-back/index.d.ts
CHANGED
|
@@ -782,18 +782,6 @@ declare namespace angular {
|
|
|
782
782
|
): void;
|
|
783
783
|
}
|
|
784
784
|
|
|
785
|
-
interface ICompiledExpression {
|
|
786
|
-
(context: any, locals?: any): any;
|
|
787
|
-
|
|
788
|
-
literal: boolean;
|
|
789
|
-
constant: boolean;
|
|
790
|
-
|
|
791
|
-
// If value is not provided, undefined is gonna be used since the implementation
|
|
792
|
-
// does not check the parameter. Let's force a value for consistency. If consumer
|
|
793
|
-
// whants to undefine it, pass the undefined value explicitly.
|
|
794
|
-
assign(context: any, value: any): any;
|
|
795
|
-
}
|
|
796
|
-
|
|
797
785
|
/**
|
|
798
786
|
* $location - $locationProvider - service in module ng
|
|
799
787
|
* see https://docs.angularjs.org/api/ng/service/$location
|