UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,600 lines 416 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "OuterSubscriber", "range": [ 9, 24 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 24 } } }, "imported": { "type": "Identifier", "name": "OuterSubscriber", "range": [ 9, 24 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 24 } } }, "range": [ 9, 24 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 24 } } } ], "source": { "type": "Literal", "value": "../OuterSubscriber", "raw": "'../OuterSubscriber'", "range": [ 32, 52 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 52 } } }, "range": [ 0, 53 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 53 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "subscribeToResult", "range": [ 63, 80 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 26 } } }, "imported": { "type": "Identifier", "name": "subscribeToResult", "range": [ 63, 80 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 26 } } }, "range": [ 63, 80 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 26 } } } ], "source": { "type": "Literal", "value": "../util/subscribeToResult", "raw": "'../util/subscribeToResult'", "range": [ 88, 115 ], "loc": { "start": { "line": 2, "column": 34 }, "end": { "line": 2, "column": 61 } } }, "range": [ 54, 116 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 62 } }, "trailingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 117, 153 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 36 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "mergeMapTo", "range": [ 170, 180 ], "loc": { "start": { "line": 4, "column": 16 }, "end": { "line": 4, "column": 26 } } }, "params": [ { "type": "Identifier", "name": "innerObservable", "range": [ 181, 196 ], "loc": { "start": { "line": 4, "column": 27 }, "end": { "line": 4, "column": 42 } } }, { "type": "Identifier", "name": "resultSelector", "range": [ 198, 212 ], "loc": { "start": { "line": 4, "column": 44 }, "end": { "line": 4, "column": 58 } } }, { "type": "Identifier", "name": "concurrent", "range": [ 214, 224 ], "loc": { "start": { "line": 4, "column": 60 }, "end": { "line": 4, "column": 70 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "===", "left": { "type": "Identifier", "name": "concurrent", "range": [ 236, 246 ], "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 18 } } }, "right": { "type": "UnaryExpression", "operator": "void", "argument": { "type": "Literal", "value": 0, "raw": "0", "range": [ 256, 257 ], "loc": { "start": { "line": 5, "column": 28 }, "end": { "line": 5, "column": 29 } } }, "prefix": true, "range": [ 251, 257 ], "loc": { "start": { "line": 5, "column": 23 }, "end": { "line": 5, "column": 29 } } }, "range": [ 236, 257 ], "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 29 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "concurrent", "range": [ 261, 271 ], "loc": { "start": { "line": 5, "column": 33 }, "end": { "line": 5, "column": 43 } } }, "right": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Number", "range": [ 274, 280 ], "loc": { "start": { "line": 5, "column": 46 }, "end": { "line": 5, "column": 52 } } }, "property": { "type": "Identifier", "name": "POSITIVE_INFINITY", "range": [ 281, 298 ], "loc": { "start": { "line": 5, "column": 53 }, "end": { "line": 5, "column": 70 } } }, "range": [ 274, 298 ], "loc": { "start": { "line": 5, "column": 46 }, "end": { "line": 5, "column": 70 } } }, "range": [ 261, 298 ], "loc": { "start": { "line": 5, "column": 33 }, "end": { "line": 5, "column": 70 } } }, "range": [ 261, 299 ], "loc": { "start": { "line": 5, "column": 33 }, "end": { "line": 5, "column": 71 } } } ], "range": [ 259, 301 ], "loc": { "start": { "line": 5, "column": 31 }, "end": { "line": 5, "column": 73 } } }, "alternate": null, "range": [ 232, 301 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 73 } } }, { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "===", "left": { "type": "UnaryExpression", "operator": "typeof", "argument": { "type": "Identifier", "name": "resultSelector", "range": [ 317, 331 ], "loc": { "start": { "line": 6, "column": 15 }, "end": { "line": 6, "column": 29 } } }, "prefix": true, "range": [ 310, 331 ], "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 29 } } }, "right": { "type": "Literal", "value": "number", "raw": "'number'", "range": [ 336, 344 ], "loc": { "start": { "line": 6, "column": 34 }, "end": { "line": 6, "column": 42 } } }, "range": [ 310, 344 ], "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 42 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "concurrent", "range": [ 356, 366 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 18 } } }, "right": { "type": "Identifier", "name": "resultSelector", "range": [ 369, 383 ], "loc": { "start": { "line": 7, "column": 21 }, "end": { "line": 7, "column": 35 } } }, "range": [ 356, 383 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 35 } } }, "range": [ 356, 384 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 36 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "resultSelector", "range": [ 393, 407 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 22 } } }, "right": { "type": "Literal", "value": null, "raw": "null", "range": [ 410, 414 ], "loc": { "start": { "line": 8, "column": 25 }, "end": { "line": 8, "column": 29 } } }, "range": [ 393, 414 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 29 } } }, "range": [ 393, 415 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 30 } } } ], "range": [ 346, 421 ], "loc": { "start": { "line": 6, "column": 44 }, "end": { "line": 9, "column": 5 } } }, "alternate": null, "range": [ 306, 421 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 9, "column": 5 } } }, { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 433, 437 ], "loc": { "start": { "line": 10, "column": 11 }, "end": { "line": 10, "column": 15 } } }, "property": { "type": "Identifier", "name": "lift", "range": [ 438, 442 ], "loc": { "start": { "line": 10, "column": 16 }, "end": { "line": 10, "column": 20 } } }, "range": [ 433, 442 ], "loc": { "start": { "line": 10, "column": 11 }, "end": { "line": 10, "column": 20 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "MergeMapToOperator", "range": [ 447, 465 ], "loc": { "start": { "line": 10, "column": 25 }, "end": { "line": 10, "column": 43 } } }, "arguments": [ { "type": "Identifier", "name": "innerObservable", "range": [ 466, 481 ], "loc": { "start": { "line": 10, "column": 44 }, "end": { "line": 10, "column": 59 } } }, { "type": "Identifier", "name": "resultSelector", "range": [ 483, 497 ], "loc": { "start": { "line": 10, "column": 61 }, "end": { "line": 10, "column": 75 } } }, { "type": "Identifier", "name": "concurrent", "range": [ 499, 509 ], "loc": { "start": { "line": 10, "column": 77 }, "end": { "line": 10, "column": 87 } } } ], "range": [ 443, 510 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 88 } } } ], "range": [ 433, 511 ], "loc": { "start": { "line": 10, "column": 11 }, "end": { "line": 10, "column": 89 } } }, "range": [ 426, 512 ], "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 90 } } } ], "range": [ 226, 514 ], "loc": { "start": { "line": 4, "column": 72 }, "end": { "line": 11, "column": 1 } } }, "generator": false, "expression": false, "range": [ 161, 514 ], "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 11, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 117, 153 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 36 } } } ], "trailingComments": [ { "type": "Line", "value": " TODO: Figure out correct signature here: an Operator<Observable<T>, R>", "range": [ 515, 588 ], "loc": { "start": { "line": 12, "column": 0 }, "end": { "line": 12, "column": 73 } } }, { "type": "Line", "value": " needs to implement call(observer: Subscriber<R>): Subscriber<Observable<T>>", "range": [ 589, 673 ], "loc": { "start": { "line": 13, "column": 0 }, "end": { "line": 13, "column": 84 } } } ] }, "specifiers": [], "source": null, "range": [ 154, 514 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 11, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": " tslint:disable:max-line-length ", "range": [ 117, 153 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 36 } } } ], "trailingComments": [ { "type": "Line", "value": " TODO: Figure out correct signature here: an Operator<Observable<T>, R>", "range": [ 515, 588 ], "loc": { "start": { "line": 12, "column": 0 }, "end": { "line": 12, "column": 73 } } }, { "type": "Line", "value": " needs to implement call(observer: Subscriber<R>): Subscriber<Observable<T>>", "range": [ 589, 673 ], "loc": { "start": { "line": 13, "column": 0 }, "end": { "line": 13, "column": 84 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "MergeMapToOperator", "range": [ 685, 703 ], "loc": { "start": { "line": 14, "column": 11 }, "end": { "line": 14, "column": 29 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "MergeMapToOperator", "range": [ 734, 752 ], "loc": { "start": { "line": 15, "column": 13 }, "end": { "line": 15, "column": 31 } } }, "params": [ { "type": "Identifier", "name": "ish", "range": [ 753, 756 ], "loc": { "start": { "line": 15, "column": 32 }, "end": { "line": 15, "column": 35 } } }, { "type": "Identifier", "name": "resultSelector", "range": [ 758, 772 ], "loc": { "start": { "line": 15, "column": 37 }, "end": { "line": 15, "column": 51 } } }, { "type": "Identifier", "name": "concurrent", "range": [ 774, 784 ], "loc": { "start": { "line": 15, "column": 53 }, "end": { "line": 15, "column": 63 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "===", "left": { "type": "Identifier", "name": "concurrent", "range": [ 800, 810 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 22 } } }, "right": { "type": "UnaryExpression", "operator": "void", "argument": { "type": "Literal", "value": 0, "raw": "0", "range": [ 820, 821 ], "loc": { "start": { "line": 16, "column": 32 }, "end": { "line": 16, "column": 33 } } }, "prefix": true, "range": [ 815, 821 ], "loc": { "start": { "line": 16, "column": 27 }, "end": { "line": 16, "column": 33 } } }, "range": [ 800, 821 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 33 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "concurrent", "range": [ 825, 835 ], "loc": { "start": { "line": 16, "column": 37 }, "end": { "line": 16, "column": 47 } } }, "right": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Number", "range": [ 838, 844 ], "loc": { "start": { "line": 16, "column": 50 }, "end": { "line": 16, "column": 56 } } }, "property": { "type": "Identifier", "name": "POSITIVE_INFINITY", "range": [ 845, 862 ], "loc": { "start": { "line": 16, "column": 57 }, "end": { "line": 16, "column": 74 } } }, "range": [ 838, 862 ], "loc": { "start": { "line": 16, "column": 50 }, "end": { "line": 16, "column": 74 } } }, "range": [ 825, 862 ], "loc": { "start": { "line": 16, "column": 37 }, "end": { "line": 16, "column": 74 } } }, "range": [ 825, 863 ], "loc": { "start": { "line": 16, "column": 37 }, "end": { "line": 16, "column": 75 } } } ], "range": [ 823, 865 ], "loc": { "start": { "line": 16, "column": 35 }, "end": { "line": 16, "column": 77 } } }, "alternate": null, "range": [ 796, 865 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 77 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 874, 878 ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 12 } } }, "property": { "type": "Identifier", "name": "ish", "range": [ 879, 882 ], "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 16 } } }, "range": [ 874, 882 ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 16 } } }, "right": { "type": "Identifier", "name": "ish", "range": [ 885, 888 ], "loc": { "start": { "line": 17, "column": 19 }, "end": { "line": 17, "column": 22 } } }, "range": [ 874, 888 ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 22 } } }, "range": [ 874, 889 ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 23 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 898, 902 ], "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 12 } } }, "property": { "type": "Identifier", "name": "resultSelector", "range": [ 903, 917 ], "loc": { "start": { "line": 18, "column": 13 }, "end": { "line": 18, "column": 27 } } }, "range": [ 898, 917 ], "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 27 } } }, "right