UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,520 lines (1,519 loc) 82.5 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "Subscriber", "range": [ 9, 19 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 } } }, "imported": { "type": "Identifier", "name": "Subscriber", "range": [ 9, 19 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 } } }, "range": [ 9, 19 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 } } } ], "source": { "type": "Literal", "value": "../Subscriber", "raw": "'../Subscriber'", "range": [ 27, 42 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 42 } } }, "range": [ 0, 43 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 43 } }, "trailingComments": [ { "type": "Block", "value": "*\n * @return {Observable<any[]>|WebSocketSubject<T>|Observable<T>}\n * @method toArray\n * @owner Observable\n ", "range": [ 44, 156 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 6, "column": 3 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "toArray", "range": [ 173, 180 ], "loc": { "start": { "line": 7, "column": 16 }, "end": { "line": 7, "column": 23 } } }, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 196, 200 ], "loc": { "start": { "line": 8, "column": 11 }, "end": { "line": 8, "column": 15 } } }, "property": { "type": "Identifier", "name": "lift", "range": [ 201, 205 ], "loc": { "start": { "line": 8, "column": 16 }, "end": { "line": 8, "column": 20 } } }, "range": [ 196, 205 ], "loc": { "start": { "line": 8, "column": 11 }, "end": { "line": 8, "column": 20 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "ToArrayOperator", "range": [ 210, 225 ], "loc": { "start": { "line": 8, "column": 25 }, "end": { "line": 8, "column": 40 } } }, "arguments": [], "range": [ 206, 227 ], "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 42 } } } ], "range": [ 196, 228 ], "loc": { "start": { "line": 8, "column": 11 }, "end": { "line": 8, "column": 43 } } }, "range": [ 189, 229 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 44 } } } ], "range": [ 183, 231 ], "loc": { "start": { "line": 7, "column": 26 }, "end": { "line": 9, "column": 1 } } }, "generator": false, "expression": false, "range": [ 164, 231 ], "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 9, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": "*\n * @return {Observable<any[]>|WebSocketSubject<T>|Observable<T>}\n * @method toArray\n * @owner Observable\n ", "range": [ 44, 156 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 6, "column": 3 } } } ], "trailingComments": [] }, "specifiers": [], "source": null, "range": [ 157, 231 ], "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 9, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": "*\n * @return {Observable<any[]>|WebSocketSubject<T>|Observable<T>}\n * @method toArray\n * @owner Observable\n ", "range": [ 44, 156 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 6, "column": 3 } } } ] }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "ToArrayOperator", "range": [ 236, 251 ], "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 19 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "ToArrayOperator", "range": [ 282, 297 ], "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 28 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 300, 307 ], "loc": { "start": { "line": 11, "column": 31 }, "end": { "line": 12, "column": 5 } } }, "generator": false, "expression": false, "range": [ 273, 307 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 12, "column": 5 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "ToArrayOperator", "range": [ 312, 327 ], "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 19 } } }, "property": { "type": "Identifier", "name": "prototype", "range": [ 328, 337 ], "loc": { "start": { "line": 13, "column": 20 }, "end": { "line": 13, "column": 29 } } }, "range": [ 312, 337 ], "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 29 } } }, "property": { "type": "Identifier", "name": "call", "range": [ 338, 342 ], "loc": { "start": { "line": 13, "column": 30 }, "end": { "line": 13, "column": 34 } } }, "range": [ 312, 342 ], "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 34 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "subscriber", "range": [ 355, 365 ], "loc": { "start": { "line": 13, "column": 47 }, "end": { "line": 13, "column": 57 } } }, { "type": "Identifier", "name": "source", "range": [ 367, 373 ], "loc": { "start": { "line": 13, "column": 59 }, "end": { "line": 13, "column": 65 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "source", "range": [ 392, 398 ], "loc": { "start": { "line": 14, "column": 15 }, "end": { "line": 14, "column": 21 } } }, "property": { "type": "Identifier", "name": "_subscribe", "range": [ 399, 409 ], "loc": { "start": { "line": 14, "column": 22 }, "end": { "line": 14, "column": 32 } } }, "range": [ 392, 409 ], "loc": { "start": { "line": 14, "column": 15 }, "end": { "line": 14, "column": 32 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "ToArraySubscriber", "range": [ 414, 431 ], "loc": { "start": { "line": 14, "column": 37 }, "end": { "line": 14, "column": 54 } } }, "arguments": [ { "type": "Identifier", "name": "subscriber", "range": [ 432, 442 ], "loc": { "start": { "line": 14, "column": 55 }, "end": { "line": 14, "column": 65 } } } ], "range": [ 410, 443 ], "loc": { "start": { "line": 14, "column": 33 }, "end": { "line": 14, "column": 66 } } } ], "range": [ 392, 444 ], "loc": { "start": { "line": 14, "column": 15 }, "end": { "line": 14, "column": 67 } } }, "range": [ 385, 445 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 68 } } } ], "range": [ 375, 451 ], "loc": { "start": { "line": 13, "column": 67 }, "end": { "line": 15, "column": 5 } } }, "generator": false, "expression": false, "range": [ 345, 451 ], "loc": { "start": { "line": 13, "column": 37 }, "end": { "line": 15, "column": 5 } } }, "range": [ 312, 451 ], "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 15, "column": 5 } } }, "range": [ 312, 452 ], "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 15, "column": 6 } } }, { "type": "ReturnStatement", "argument": { "type": "Identifier", "name": "ToArrayOperator", "range": [ 464, 479 ], "loc": { "start": { "line": 16, "column": 11 }, "end": { "line": 16, "column": 26 } } }, "range": [ 457, 480 ], "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 27 } } } ], "range": [ 267, 482 ], "loc": { "start": { "line": 10, "column": 35 }, "end": { "line": 17, "column": 1 } } }, "generator": false, "expression": false, "range": [ 255, 482 ], "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 17, "column": 1 } } }, "arguments": [], "range": [ 255, 484 ], "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 17, "column": 3 } } }, "range": [ 236, 485 ], "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 17, "column": 4 } } } ], "kind": "var", "range": [ 232, 486 ], "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 17, "column": 5 } }, "trailingComments": [ { "type": "Block", "value": "*\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n ", "range": [ 487, 578 ], "loc": { "start": { "line": 18, "column": 0 }, "end": { "line": 22, "column": 3 } } } ] }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "ToArraySubscriber", "range": [ 583, 600 ], "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 21 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "_super", "range": [ 614, 620 ], "loc": { "start": { "line": 23, "column": 35 }, "end": { "line": 23, "column": 41 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "__extends", "range": [ 628, 637 ], "loc": { "start": { "line": 24, "column": 4 }, "end": { "line": 24, "column": 13 } } }, "arguments": [ { "type": "Identifier", "name": "ToArraySubscriber", "range": [ 638, 655 ], "loc": { "start": { "line": 24, "column": 14 }, "end": { "line": 24, "column": 31 } } }, { "type": "Identifier", "name": "_super", "range": [ 657, 663 ], "loc": { "start": { "line": 24, "column": 33 }, "end": { "line": 24, "column": 39 } } } ], "range": [ 628, 664 ], "loc": { "start": { "line": 24, "column": 4 }, "end": { "line": 24, "column": 40 } } }, "range": [ 628, 665 ], "loc": { "start": { "line": 24, "column": 4 }, "end": { "line": 24, "column": 41 } } }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "ToArraySubscriber", "range": [ 679, 696 ], "loc": { "start": { "line": 25, "column": 13 }, "end": { "line": 25, "column": 30 } } }, "params": [ { "type": "Identifier", "name": "destination", "range": [ 697, 708 ], "loc": { "start": { "line": 25, "column": 31 }, "end": { "line": 25, "column": 42 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "_super", "range": [ 720, 726 ], "loc": { "start": { "line": 26, "column": 8 }, "end": { "line": 26, "column": 14 } } }, "property": { "type": "Identifier", "name": "call", "range": [ 727, 731 ], "loc": { "start": { "line": 26, "column": 15 }, "end": { "line": 26, "column": 19 } } }, "range": [ 720, 731 ], "loc": { "start": { "line": 26, "column": 8 }, "end": { "line": 26, "column": 19 } } }, "arguments": [ { "type": "ThisExpression", "range": [ 732, 736 ], "loc": { "start": { "line": 26, "column": 20 }, "end": { "line": 26, "column": 24 } } }, { "type": "Identifier", "name": "destination", "range": [ 738, 749 ], "loc": { "start": { "line": 26, "column": 26 }, "end": { "line": 26, "column": 37 } } } ], "range": [ 720, 750 ], "loc": { "start": { "line": 26, "column": 8 }, "end": { "line": 26, "column": 38 } } }, "range": [ 720, 751 ], "loc": { "start": { "line": 26, "column": 8 }, "end": { "line": 26, "column": 39 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 760, 764 ], "loc": { "start": { "line": 27, "column": 8 }, "end": { "line": 27, "column": 12 } } }, "property": { "type": "Identifier", "name": "array", "range": [ 765, 770 ], "loc": { "start": { "line": 27, "column": 13 }, "end": { "line": 27, "column": 18 } } }, "range": [ 760, 770 ], "loc": { "start": { "line": 27, "column": 8 }, "end": { "line": 27, "column": 18 } } }, "right": { "type": "ArrayExpression", "elements": [], "range": [ 773, 775 ], "loc": { "start": { "line": 27, "column": 21 }, "end": { "line": 27, "column": 23 } } }, "range": [ 760, 775 ], "loc": { "start": { "line": 27, "column": 8 }, "end": { "line": 27, "column": 23 } } }, "range": [ 760, 776 ], "loc": { "start": { "line": 27, "column": 8 }, "end": { "line": 27, "column": 24 } } } ], "range": [ 710, 782 ], "loc": { "start": { "line": 25, "column": 44 }, "end": { "line": 28, "column": 5 } } }, "generator": false, "expression": false, "range": [ 670, 782 ], "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 28, "column": 5 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "ToArraySubscriber", "range": [ 787, 804 ], "loc": { "start": { "line": 29, "column": 4 }, "end": { "line": 29, "column": 21 } } }, "property": { "type": "Identifier", "name": "prototype", "range": [ 805, 814 ], "loc": { "start": { "line": 29, "column": 22 }, "end": { "line": 29, "column": 31 } } }, "range": [ 787, 814 ], "loc": { "start": { "line": 29, "column": 4 }, "end": { "line": 29, "column": 31 } } }, "property": { "type": "Identifier", "name": "_next", "range": [ 815, 820 ], "loc": { "start": { "line": 29, "column": 32 }, "end": { "line": 29, "column": 37 } } }, "range": [ 787, 820 ], "loc": { "start": { "line": 29, "column": 4 }, "end": { "line": 29, "column": 37 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 833, 834 ], "loc": { "start": { "line": 29, "column": 50 }, "end": { "line": 29, "column": 51 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 846, 850 ], "loc": { "start": { "line": 30, "column": 8 }, "end": { "line": 30,