@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,610 lines (1,609 loc) • 370 kB
JSON
{
"type": "Program",
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "tryCatch",
"range": [
9,
17
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 17
}
}
},
"imported": {
"type": "Identifier",
"name": "tryCatch",
"range": [
9,
17
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 17
}
}
},
"range": [
9,
17
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 17
}
}
}
],
"source": {
"type": "Literal",
"value": "../util/tryCatch",
"raw": "'../util/tryCatch'",
"range": [
25,
43
],
"loc": {
"start": {
"line": 1,
"column": 25
},
"end": {
"line": 1,
"column": 43
}
}
},
"range": [
0,
44
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 44
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "errorObject",
"range": [
54,
65
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 20
}
}
},
"imported": {
"type": "Identifier",
"name": "errorObject",
"range": [
54,
65
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 20
}
}
},
"range": [
54,
65
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 20
}
}
}
],
"source": {
"type": "Literal",
"value": "../util/errorObject",
"raw": "'../util/errorObject'",
"range": [
73,
94
],
"loc": {
"start": {
"line": 2,
"column": 28
},
"end": {
"line": 2,
"column": 49
}
}
},
"range": [
45,
95
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 50
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "subscribeToResult",
"range": [
105,
122
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 26
}
}
},
"imported": {
"type": "Identifier",
"name": "subscribeToResult",
"range": [
105,
122
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 26
}
}
},
"range": [
105,
122
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 26
}
}
}
],
"source": {
"type": "Literal",
"value": "../util/subscribeToResult",
"raw": "'../util/subscribeToResult'",
"range": [
130,
157
],
"loc": {
"start": {
"line": 3,
"column": 34
},
"end": {
"line": 3,
"column": 61
}
}
},
"range": [
96,
158
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 62
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "OuterSubscriber",
"range": [
168,
183
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 24
}
}
},
"imported": {
"type": "Identifier",
"name": "OuterSubscriber",
"range": [
168,
183
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 24
}
}
},
"range": [
168,
183
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 24
}
}
}
],
"source": {
"type": "Literal",
"value": "../OuterSubscriber",
"raw": "'../OuterSubscriber'",
"range": [
191,
211
],
"loc": {
"start": {
"line": 4,
"column": 32
},
"end": {
"line": 4,
"column": 52
}
}
},
"range": [
159,
212
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 53
}
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * @param project\n * @param seed\n * @param concurrent\n * @return {Observable<R>|WebSocketSubject<T>|Observable<T>}\n * @method mergeScan\n * @owner Observable\n ",
"range": [
213,
377
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 12,
"column": 3
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "mergeScan",
"range": [
394,
403
],
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 25
}
}
},
"params": [
{
"type": "Identifier",
"name": "project",
"range": [
404,
411
],
"loc": {
"start": {
"line": 13,
"column": 26
},
"end": {
"line": 13,
"column": 33
}
}
},
{
"type": "Identifier",
"name": "seed",
"range": [
413,
417
],
"loc": {
"start": {
"line": 13,
"column": 35
},
"end": {
"line": 13,
"column": 39
}
}
},
{
"type": "Identifier",
"name": "concurrent",
"range": [
419,
429
],
"loc": {
"start": {
"line": 13,
"column": 41
},
"end": {
"line": 13,
"column": 51
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "BinaryExpression",
"operator": "===",
"left": {
"type": "Identifier",
"name": "concurrent",
"range": [
441,
451
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 18
}
}
},
"right": {
"type": "UnaryExpression",
"operator": "void",
"argument": {
"type": "Literal",
"value": 0,
"raw": "0",
"range": [
461,
462
],
"loc": {
"start": {
"line": 14,
"column": 28
},
"end": {
"line": 14,
"column": 29
}
}
},
"prefix": true,
"range": [
456,
462
],
"loc": {
"start": {
"line": 14,
"column": 23
},
"end": {
"line": 14,
"column": 29
}
}
},
"range": [
441,
462
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 29
}
}
},
"consequent": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "Identifier",
"name": "concurrent",
"range": [
466,
476
],
"loc": {
"start": {
"line": 14,
"column": 33
},
"end": {
"line": 14,
"column": 43
}
}
},
"right": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Number",
"range": [
479,
485
],
"loc": {
"start": {
"line": 14,
"column": 46
},
"end": {
"line": 14,
"column": 52
}
}
},
"property": {
"type": "Identifier",
"name": "POSITIVE_INFINITY",
"range": [
486,
503
],
"loc": {
"start": {
"line": 14,
"column": 53
},
"end": {
"line": 14,
"column": 70
}
}
},
"range": [
479,
503
],
"loc": {
"start": {
"line": 14,
"column": 46
},
"end": {
"line": 14,
"column": 70
}
}
},
"range": [
466,
503
],
"loc": {
"start": {
"line": 14,
"column": 33
},
"end": {
"line": 14,
"column": 70
}
}
},
"range": [
466,
504
],
"loc": {
"start": {
"line": 14,
"column": 33
},
"end": {
"line": 14,
"column": 71
}
}
}
],
"range": [
464,
506
],
"loc": {
"start": {
"line": 14,
"column": 31
},
"end": {
"line": 14,
"column": 73
}
}
},
"alternate": null,
"range": [
437,
506
],
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 73
}
}
},
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
518,
522
],
"loc": {
"start": {
"line": 15,
"column": 11
},
"end": {
"line": 15,
"column": 15
}
}
},
"property": {
"type": "Identifier",
"name": "lift",
"range": [
523,
527
],
"loc": {
"start": {
"line": 15,
"column": 16
},
"end": {
"line": 15,
"column": 20
}
}
},
"range": [
518,
527
],
"loc": {
"start": {
"line": 15,
"column": 11
},
"end": {
"line": 15,
"column": 20
}
}
},
"arguments": [
{
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "MergeScanOperator",
"range": [
532,
549
],
"loc": {
"start": {
"line": 15,
"column": 25
},
"end": {
"line": 15,
"column": 42
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "project",
"range": [
550,
557
],
"loc": {
"start": {
"line": 15,
"column": 43
},
"end": {
"line": 15,
"column": 50
}
}
},
{
"type": "Identifier",
"name": "seed",
"range": [
559,
563
],
"loc": {
"start": {
"line": 15,
"column": 52
},
"end": {
"line": 15,
"column": 56
}
}
},
{
"type": "Identifier",
"name": "concurrent",
"range": [
565,
575
],
"loc": {
"start": {
"line": 15,
"column": 58
},
"end": {
"line": 15,
"column": 68
}
}
}
],
"range": [
528,
576
],
"loc": {
"start": {
"line": 15,
"column": 21
},
"end": {
"line": 15,
"column": 69
}
}
}
],
"range": [
518,
577
],
"loc": {
"start": {
"line": 15,
"column": 11
},
"end": {
"line": 15,
"column": 70
}
}
},
"range": [
511,
578
],
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 15,
"column": 71
}
}
}
],
"range": [
431,
580
],
"loc": {
"start": {
"line": 13,
"column": 53
},
"end": {
"line": 16,
"column": 1
}
}
},
"generator": false,
"expression": false,
"range": [
385,
580
],
"loc": {
"start": {
"line": 13,
"column": 7
},
"end": {
"line": 16,
"column": 1
}
},
"leadingComments": [
{
"type": "Block",
"value": "*\n * @param project\n * @param seed\n * @param concurrent\n * @return {Observable<R>|WebSocketSubject<T>|Observable<T>}\n * @method mergeScan\n * @owner Observable\n ",
"range": [
213,
377
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 12,
"column": 3
}
}
}
],
"trailingComments": []
},
"specifiers": [],
"source": null,
"range": [
378,
580
],
"loc": {
"start": {
"line": 13,
"column": 0
},
"end": {
"line": 16,
"column": 1
}
},
"leadingComments": [
{
"type": "Block",
"value": "*\n * @param project\n * @param seed\n * @param concurrent\n * @return {Observable<R>|WebSocketSubject<T>|Observable<T>}\n * @method mergeScan\n * @owner Observable\n ",
"range": [
213,
377
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 12,
"column": 3
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "MergeScanOperator",
"range": [
592,
609
],
"loc": {
"start": {
"line": 17,
"column": 11
},
"end": {
"line": 17,
"column": 28
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "MergeScanOperator",
"range": [
640,
657
],
"loc": {
"start": {
"line": 18,
"column": 13
},
"end": {
"line": 18,
"column": 30
}
}
},
"params": [
{
"type": "Identifier",
"name": "project",
"range": [
658,
665
],
"loc": {
"start": {
"line": 18,
"column": 31
},
"end": {
"line": 18,
"column": 38
}
}
},
{
"type": "Identifier",
"name": "seed",
"range": [
667,
671
],
"loc": {
"start": {
"line": 18,
"column": 40
},
"end": {
"line": 18,
"column": 44
}
}
},
{
"type": "Identifier",
"name": "concurrent",
"range": [
673,
683
],
"loc": {
"start": {
"line": 18,
"column": 46
},
"end": {
"line": 18,
"column": 56
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
695,
699
],
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "project",
"range": [
700,
707
],
"loc": {
"start": {
"line": 19,
"column": 13
},
"end": {
"line": 19,
"column": 20
}
}
},
"range": [
695,
707
],
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 20
}
}
},
"right": {
"type": "Identifier",
"name": "project",
"range": [
710,
717
],
"loc": {
"start": {
"line": 19,
"column": 23
},
"end": {
"line": 19,
"column": 30
}
}
},
"range": [
695,
717
],
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 30
}
}
},
"range": [
695,
718
],
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 31
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
727,
731
],
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "seed",
"range": [
732,
736
],
"loc": {
"start": {
"line": 20,
"column": 13
},
"end": {
"line": 20,
"column": 17
}
}
},
"range": [
727,
736
],
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 17
}
}
},
"right": {
"type": "Identifier",
"name": "seed",
"range": [
739,
743
],
"loc": {
"start": {
"line": 20,
"column": 20
},
"end": {
"line": 20,
"column": 24
}
}
},
"range": [
727,
743
],
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 24
}
}
},
"range": [
727,
744
],
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 25
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
753,
757
],
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "concurrent",
"range": [
758,
768
],
"loc": {
"start": {
"line": 21,
"column": 13
},
"end": {
"line": 21,
"column": 23
}
}
},
"range": [
753,
768
],
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 23
}
}
},
"right": {
"type": "Identifier",
"name": "concurrent",
"range": [
771,
781
],
"loc": {
"start": {
"line": 21,
"column": 26
},
"end": {
"line": 21,
"column": 36
}
}
},
"range": [
753,
781
],
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 36
}
}
},
"range": [
753,
782
],
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 37
}
}
}
],
"range": [
685,
788
],
"loc": {
"start": {
"line": 18,
"column": 58
},
"end": {
"line": 22,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
631,
788
],
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 22,
"column": 5
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "MergeScanOperator",
"range": [
793,
810
],
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 23,
"column": 21
}
}
},
"property": {
"type": "Identifier",
"name": "prototype",
"range": [
811,
820
],
"loc": {
"start": {
"line": 23,
"column": 22
},
"end": {
"line": 23,
"column": 31
}
}
},
"range": [
793,
820
],
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 23,
"column": 31
}
}
},
"property": {
"type": "Identifier",
"name": "call",
"range": [
821,
825
],
"loc": {
"start": {
"line": 23,
"column": 32
},
"end": {
"line": 23,
"column": 36
}
}
},
"range": [
793,
825
],
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 23,
"column": 36
}
}
},
"right": {
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "subscriber",
"range": [
838,
848
],
"loc": {
"start": {
"line": 23,
"column": 49
},
"end": {
"line": 23,
"column": 59
}
}
},
{
"type": "Identifier",
"name": "source",
"range": [
850,
856
],
"loc": {
"start": {
"line": 23,
"column": 61
},
"end": {
"line": 23,
"column": 67
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "source",
"range": [
875,
881
],
"loc": {
"start": {
"line": 24,
"column": 15
},
"end": {
"line": 24,
"column": 21
}
}
},
"property": {
"type": "Identifier",
"name": "_subscribe",
"range": [
882,
892
],
"loc": {
"start": {
"line": 24,
"column": 22
},
"end": {
"line": 24,
"column": 32
}
}
},
"range": [
875,
892
],
"loc": {
"start": {